Release British Pathé and Reuters historical collection
#16
(2019-07-13, 01:13)Atreyu Wrote: I seemed to have found an issue.
After installing your addon the YouTube search function is broken.
Selecting 'Search' in the YouTube addon (v.6.5.0) throws an error.
Uninstalling BP and restarting Kodi fixes it.
Tested on Coreelec (aml) only.

Regards,
Atreyu

That is most odd as the British Pathé add-on doesn't use, or in anyway reference, YouTube - they are entirely unrelated.
Maybe try reinstalling and seeing if the error persist - if so post a log file and I'd be happy to take a look.
I would be really surprised if the two are conflicting as nothing in either references the other.

...just to add I have both installed and working on Mac, Linux and Windows - so again I'm 100% sure that the issue with YoutTube has nothing to do with this plugin.
Reply
#17
(2019-07-13, 01:13)Atreyu Wrote: I seemed to have found a possible issue.
It's not consistent, though.

Sometimes, when BP is installed, the YouTube (v6.5.0) search function will throw an error when selected ('check log for details').

Tested on windows and Linux. Might need some further study as I could not get consistent results.

How to reproduce:
-install BP
-change caching mode (deselect)
-Confirm and exit BP

-Start YouTube
-Select 'Search'

After uninstalling BP and restarting Kodi the error will no longer occur.
It's late so I will not investigate further right now, but let me know if it's reproducible or if you need some more testing or logs.

Regards,
Atreyu

No I can't reproduce this on any platform - please do post the log. I would also suggest posting it on the thread for the YouTube add-on as well as that is the add-on throwing the error.
My first guess would be that you are having some kind of intermittent networking issues (hence the YouTube search failing) and that the error isn't actually related to either add-on - although I stand to be corrected.
Reply
#18
(2019-07-13, 10:17)fraserc Wrote:
(2019-07-13, 01:13)Atreyu Wrote: I seemed to have found a possible issue.
It's not consistent, though.

Sometimes, when BP is installed, the YouTube (v6.5.0) search function will throw an error when selected ('check log for details').

Tested on windows and Linux. Might need some further study as I could not get consistent results.

How to reproduce:
-install BP
-change caching mode (deselect)
-Confirm and exit BP

-Start YouTube
-Select 'Search'

After uninstalling BP and restarting Kodi the error will no longer occur.
It's late so I will not investigate further right now, but let me know if it's reproducible or if you need some more testing or logs.

Regards,
Atreyu

No I can't reproduce this on any platform - please do post the log. I would also suggest posting it on the thread for the YouTube add-on as well as that is the add-on throwing the error.
My first guess would be that you are having some kind of intermittent networking issues (hence the YouTube search failing) and that the error isn't actually related to either add-on - although I stand to be corrected.  
Hi @fraserc,

I spend some more time on this and i am able to reproduce consistently now on multipe systems.
Key is, the issue happens everytime content is played from within the BP addon, until Kodi is restarted. Then, the issue is gone (until the next video is played in BP).

Just to be clear, i find this a very odd thing as well Undecided
I am certain there's no networking issues an no issues occur on any system without the BP addon or with the addon present without playing videos.
\edit: tested on Android: issue does not occur

Log: https://paste.ubuntu.com/p/Q3T7VpSbjD/

System:

Windows 10 X64
Kodi 18.3

Reproduce:

- Start BP
- Play any video, even for a few seconds
- Exit BP

- Start YouTube
- Select Search
- Issue is present

-Restart Kodi
- Issue is gone until the next BP video is played.


Hope it helps!

Atreyu
Reply
#19
@Atreyu - OK I can actually reproduce that - and I can see the same error. i.e.

Code:
...\Kodi\addons\plugin.video.youtube\resources\lib\youtube_plugin\kodion\utils\search_history.py", line 32, in list result.append(item[0]) TypeError: 'NoneType' object has no attribute '__getitem__'

Very bizzare - on the face of it it looks like an issue with the YouTube add-on not correctly checking its returned data..i.e.

Code:
result.append(item[0])
where the item can be (and is) None.

What I can't for the life of me is work out why this has anything to do with the British Pathé plugin - my only guess is perhaps some kind of sqlite3 conflict or connection issue. 

Anyhow apologies for any inconvenience! I will raise this as an issue on the YouTube plugin as it really does look to be an issue on their side.
Reply
#20
Yes, very bizarre indeed,but certainly no need for any apologies, just trying to figure this out since I cannot think of any reason why this only happens after I play an item through BP.

Thanks for your efforts @fraserc, it is appreciated Smile
Reply
#21
(2019-07-13, 13:12)Atreyu Wrote: Yes, very bizarre indeed,but certainly no need for any apologies, just trying to figure this out since I cannot think of any reason why this only happens after I play an item through BP.

Thanks for your efforts @fraserc, it is appreciated Smile

I have raised this here: https://forum.kodi.tv/showthread.php?tid...pid2868050

Will also post an issue on the github tracker for the YouTube add-on - pretty sure this can be resolved quickly - thank again for catching this Smile
Reply
#22
Sure, np. Let's see if the YT author(s) can get it resolved Wink
Reply
#23
(2019-07-13, 14:18)Atreyu Wrote: Sure, np. Let's see if the YT author(s) can get it resolved Wink

OK I have worked out exactly what is happening - if not why  - and it is fairly bizzare to say the least.

Basically the British Pathé add-on uses a module I wrote called "script.module.cache". 
This cache module uses sqlite3 to store data is a persistent database. 
In doing this it calls a function called "register_converter" that tells sqlite3 how to serialise/deserialise binary data ...

Now the YouTube add-on also uses sqlite3 for much the same reasons - and when it tries to extract binary data it is - for some reason - using the convertor I registered in my caching module. 
It is as if when I register the convertor ALL instances of sqlite3 are using it - which is really, really odd - why the sqlite3 instance is shared across these plugins at all is unclear. 

I will post a fix to the script.module.cache today that should fix the issue - however it might take a few days for it to make it into the repos.

I can't thank you enough for finding this bug - it is actually a very interesting issue and would have no doubt affected other plugins too.
Reply
#24
Thanks for your explanation. Very clear, now I can give it a rest as I always suffer from curiosity Wink
I had a hunch this would affect things more widely, so indeed a good thing it is in view at this stage.

Cheers,
Atreyu
Reply
#25
Short note on your fine plugins,
I wasn't able to install your repo on my Andoid & 18.3
https://codeload.github.com/FraserChapma...zip/master
so I just installed BP & LOC from kodi's repo.
Reply
#26
(2019-07-13, 18:34)asik1 Wrote: Short note on your fine plugins,
I wasn't able to install your repo on my Andoid & 18.3
https://codeload.github.com/FraserChapma...zip/master
so I just installed BP & LOC from kodi's repo.

Ah it is a work in progress - not really released as yet! Thanks for the kind words though - and yes all the plugins are available in the main Kodi repo Smile

@asik1  - actually that link isn't correct - the repo add-on is the zip file in the project not the entire project:

https://github.com/FraserChapman/reposit...chives.zip

The instructions are in the readme for the repo - https://github.com/FraserChapman/reposit.../README.md
Reply
#27
(2019-07-13, 17:52)Atreyu Wrote: Thanks for your explanation. Very clear, now I can give it a rest as I always suffer from curiosity Wink
I had a hunch this would affect things more widely, so indeed a good thing it is in view at this stage.

Cheers,
Atreyu

Just a heads up - this issue has been patched and fixed in the YouTube add-on - https://github.com/jdf76/plugin.video.yo...issues/640
FWIW it looks like they had similar issues in the past - but hopefully there fix will stop it ever happening again Smile
Guessing they will push the new version v.soon.
Reply
#28
OK - out of interest, does that mean that it would only ever occur for the YouTube addon or does it still need patching in your caching module ?
Reply
#29
(2019-07-14, 10:20)Atreyu Wrote: OK - out of interest, does that mean that it would only ever occur for the YouTube addon or does it still need patching in your caching module ?

Well it could theoretically occur for any add-on that fulfils all of the following criteria

1) uses sqlite3
2) sets detect_types to sqlite3.PARSE_DECLTYPES
3) does not declare its own register_converters for its types
4) is used in the same session as an addon that declares register_converters for types that are used in both add-ons

What the YouTube guys have done is to remove 2 - i.e. not type detecting
What I have done is to mitigate 3 - i.e. delete the register_converters I set.

This ensures that YouTube will never be affected by this issue in future and that script.module.cache never causes this bug in any other add-on.
Reply
#30
(2019-07-14, 12:27)fraserc Wrote:
(2019-07-14, 10:20)Atreyu Wrote: OK - out of interest, does that mean that it would only ever occur for the YouTube addon or does it still need patching in your caching module ?

Well it could theoretically occur for any add-on that fulfils all of the following criteria

1) uses sqlite3
2) sets detect_types to sqlite3.PARSE_DECLTYPES
3) does not declare its own register_converters for its types
4) is used in the same session as an addon that declares register_converters for types that are used in both add-ons

What the YouTube guys have done is to remove 2 - i.e. not type detecting
What I have done is to mitigate 3 - i.e. delete the register_converters I set.

This ensures that YouTube will never be affected by this issue in future and that script.module.cache never causes this bug in any other add-on. 

Ah, i see now.
So everthing should be fine for all once those changes are pushed Smile
Reply

Logout Mark Read Team Forum Stats Members Help
British Pathé and Reuters historical collection1