Kodi Community Forum

Full Version: Light IMDb Ratings Update 5.1.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2019-11-20, 22:22)willemd Wrote: [ -> ]Hi axlt2002,

Thanks for this add-on. It used to work great, but for some reason it now no longer functions on my machine.

I run Windows 10, Kodi 17.6 (DSplayer). Add-on version 3.5.2 (but 3.5.1 also didn't work, don't know about earlier ones). I use an MySQL database if that's relevant.

When I try to update a movie, I get an error message saying I should check the log. I have the relevant part of the log quoted below.
When I run the add-on to update all movies, I don't get an error, but even though it takes the add-on quite a while to run, none of the ratings are actually updated.
Code:
21:13:41.755 T:1956    INFO: initializing python engine.
21:13:41.755 T:1956   DEBUG: CPythonInvoker(15, C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py): start processing
21:13:41.837 T:1956   DEBUG: -->Python Interpreter Initialized<--
21:13:41.837 T:1956   DEBUG: CPythonInvoker(15, C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py): the source file to load is "C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py"
21:13:41.837 T:1956   DEBUG: CPythonInvoker(15, C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py): setting the Python path to C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update;C:\Users\userh\AppData\Roaming\Kodi\addons\script.module.certifi\lib;C:\Users\userh\AppData\Roaming\Kodi\addons\script.module.chardet\lib;C:\Users\userh\AppData\Roaming\Kodi\addons\script.module.idna\lib;C:\Users\userh\AppData\Roaming\Kodi\addons\script.module.requests\lib;C:\Users\userh\AppData\Roaming\Kodi\addons\script.module.simplejson\lib;C:\Users\userh\AppData\Roaming\Kodi\addons\script.module.urllib3\lib;C:\Program Files (x86)\Kodi\system\python\DLLs;C:\Program Files (x86)\Kodi\system\python\Lib;C:\Program Files (x86)\Kodi\python27.zip;C:\Program Files (x86)\Kodi\system\python\lib\plat-win;C:\Program Files (x86)\Kodi\system\python\lib\lib-tk;C:\Program Files (x86)\Kodi;C:\Program Files (x86)\Kodi\system\python;C:\Program Files (x86)\Kodi\system\python\lib\site-packages
21:13:41.837 T:1956   DEBUG: CPythonInvoker(15, C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py): entering source directory C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update
21:13:41.837 T:1956   DEBUG: CPythonInvoker(15, C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py): instantiating addon using automatically obtained id of "script.light.imdb.ratings.update" dependent on version 2.25.0 of the xbmc.python api
21:13:42.215 T:1956   DEBUG: [Light IMDb Ratings Update] - JSON Query: {"jsonrpc":"2.0","method":"VideoLibrary.GetMovieDetails","params":{"movieid":2019,"properties":["imdbnumber","ratings","top250"]},"id":1}
21:13:42.224 T:1956   DEBUG: [Light IMDb Ratings Update] - JSON Response: {"error":{"code":-32602,"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}
21:13:42.225 T:1956   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: ('result',)
                                            Traceback (most recent call last):
                                              File "C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py", line 16, in <module>
                                                UpdateContext()
                                              File "C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\context.py", line 13, in UpdateContext
                                                update_context.open_context_menu( sys.listitem.getfilename(), sys.listitem.getLabel() )
                                              File "C:\Users\userh\AppData\Roaming\Kodi\addons\script.light.imdb.ratings.update\resources\core\update_context.py", line 67, in open_context_menu
                                                if jSonResponse['result'].has_key( 'moviedetails' ):
                                            KeyError: ('result',)
                                            -->End of Python script error report<--
21:13:42.234 T:7200   DEBUG: ------ Window Init (DialogNotification.xml) ------
21:13:42.251 T:1956    INFO: Python script stopped
21:13:42.251 T:1956   DEBUG: Thread LanguageInvoker 1956 terminating

Full debug log: https://pastebin.com/bN0Ujc81


What could the problem be? If I need to do anything to help bughunting, let me know.
Thanks! 
HI @willemd, thanks for your post.

I took a look to the log and to be honest I don't understand where the issue could be (I just see that the JSON request returns with an error). My question is: do you know what has been changed in your Kodi installation between the moment the add-on passed from working to not working? You said "It used to work great..."...

Cheers!
(2019-11-19, 02:43)axlt2002 Wrote: [ -> ]
(2019-11-17, 02:17)zerocool_ie Wrote: [ -> ]hi @axlt2002

Thanks for the great addon!

I have a small issue... when I run it, it's fine for 20-30 movies, then it just hangs?

could it be connection rate-limiting by IMDB or is it a parse error?

Assuming the scrape order is set by idMovie in the movie table:
Code:
idMovie | Title | Result | URL
7847 | Hot Tub Time Machine 2 | Pass | https://www.imdb.com/title/tt2637294/
7848 | Hotel Rwanda | Fail | https://www.imdb.com/title/tt0395169/

Log:
https://pastebin.com/1w5Wu1bF

thanks!
Hi @zerocool_ie, thanks for your post.

Just to understand better, which version of the add-on are you using? If 3.5.2, you should enable the Kodi debug logging and re-post the Kodi log; if 4.0.2, you should post the add-on log you can find under the user_data folder.

Let me know.

Cheers!   

hi @axlt2002 

Running 4.0.2

update.log & kodi.log
wokakarute.kodi (paste)

Stuck on Jumanji: Welcome to the Jungle this time.

thanks for investigating!
(2019-11-21, 05:42)axlt2002 Wrote: [ -> ]HI @willemd, thanks for your post.

I took a look to the log and to be honest I don't understand where the issue could be (I just see that the JSON request returns with an error). My question is: do you know what has been changed in your Kodi installation between the moment the add-on passed from working to not working? You said "It used to work great..."...

Cheers! 

Hi, thanks for looking into it. I decided to install Kodi on another computer and try the add-on there. Since I use MySQL that wouldn't make a difference in the practical outcome. And well, that worked perfectly. So, something is wrong in my HTPC installation. You ask a good question, what has changed in the meanwhile since it worked? I don't really know. I only use the add-on once in perhaps every 5 or 6 months. My regular Kodi installation has been on my HTPC since version 12 or so, so maybe it's a good idea to reset everything and purge all the old crap. That might solve it anyway. For now my little workaround fixes the problem.

Thanks again!
So this is a stupid question but how do I manually run this app? Scheduling doesn't seem to work for me (nothing happens at the scheduled time) and the 'Run' button in the add-on menu is greyed out. If I select a single file via the context menu it works flawlessly but would like to update the entire library.
(2019-11-25, 13:08)Cinephile Wrote: [ -> ]So this is a stupid question but how do I manually run this app? Scheduling doesn't seem to work for me (nothing happens at the scheduled time) and the 'Run' button in the add-on menu is greyed out. If I select a single file via the context menu it works flawlessly but would like to update the entire library.
Hi @Cinephile, thanks for your post!

Which version of the add-on are you using? I never had issues with the scheduling...once changed the scheduling time (i.e. day and time), please go to the settings.xml file under the userdata\addon_data folder, open it and check the "WeekDay" and "DayTime" values. Pleas report me back what you find compared to the time at which you set the new scheduling.

Anyway, to run the add-on for a library update, just click (or press enter) on the add-on icon under the Add-ons menu in the Home screen of Kodi.

Cheers,

Alex
(2019-11-22, 22:53)zerocool_ie Wrote: [ -> ]
(2019-11-19, 02:43)axlt2002 Wrote: [ -> ]
(2019-11-17, 02:17)zerocool_ie Wrote: [ -> ]hi @axlt2002

Thanks for the great addon!

I have a small issue... when I run it, it's fine for 20-30 movies, then it just hangs?

could it be connection rate-limiting by IMDB or is it a parse error?

Assuming the scrape order is set by idMovie in the movie table:
Code:
idMovie | Title | Result | URL
7847 | Hot Tub Time Machine 2 | Pass | https://www.imdb.com/title/tt2637294/
7848 | Hotel Rwanda | Fail | https://www.imdb.com/title/tt0395169/

Log:
https://pastebin.com/1w5Wu1bF

thanks!
Hi @zerocool_ie, thanks for your post.

Just to understand better, which version of the add-on are you using? If 3.5.2, you should enable the Kodi debug logging and re-post the Kodi log; if 4.0.2, you should post the add-on log you can find under the user_data folder.

Let me know.

Cheers!      

hi @axlt2002 

Running 4.0.2

update.log & kodi.log
wokakarute.kodi (paste)

Stuck on Jumanji: Welcome to the Jungle this time.

thanks for investigating!   
Hi @zerocool_ie, thanks for your further logs.

It seems there is an issue in the code I use to generate the log file. Anyway, what sounds strange to me, is that you wrote "Stuck on Jumanji: Welcome to the Jungle this time.". Does this mean that the issue is not always happening at the same time (i.e. same movie)? If it is the case, I think it could be related to a network connection issue...if the error is not systematic (i.e. can not be replayed), maybe is related to some conditions that have changed since the last time. Slow network come to my mind...

Can you please try to update Jumanji from the context menu and report me back if it works? Please also run another library update and check where it does go stuck...

Thanks,

Alex

P.S.: I will anyway fix the bug in the log file in the next version.
(2019-11-25, 16:39)axlt2002 Wrote: [ -> ]
(2019-11-22, 22:53)zerocool_ie Wrote: [ -> ]
(2019-11-19, 02:43)axlt2002 Wrote: [ -> ]Hi @zerocool_ie, thanks for your post.

Just to understand better, which version of the add-on are you using? If 3.5.2, you should enable the Kodi debug logging and re-post the Kodi log; if 4.0.2, you should post the add-on log you can find under the user_data folder.

Let me know.

Cheers!      

hi @axlt2002 

Running 4.0.2

update.log & kodi.log
wokakarute.kodi (paste)

Stuck on Jumanji: Welcome to the Jungle this time.

thanks for investigating!                     
Hi @zerocool_ie, thanks for your further logs.

It seems there is an issue in the code I use to generate the log file. Anyway, what sounds strange to me, is that you wrote "Stuck on Jumanji: Welcome to the Jungle this time.". Does this mean that the issue is not always happening at the same time (i.e. same movie)? If it is the case, I think it could be related to a network connection issue...if the error is not systematic (i.e. can not be replayed), maybe is related to some conditions that have changed since the last time. Slow network come to my mind...

Can you please try to update Jumanji from the context menu and report me back if it works? Please also run another library update and check where it does go stuck...

Thanks,

Alex

P.S.: I will anyway fix the bug in the log file in the next version.                  


hi @axlt2002 

 
Quote:Does this mean that the issue is not always happening at the same time (i.e. same movie)?
Yes, seems random.


Context update on Jumanji: Welcome to the Jungle
Looked to go well, at least no errors.
https://paste.kodi.tv/ferericupi.kodi

Full update
  • 376 successful
  • errors
    interesting:
    Code:
    Error Contents: HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /title/tt5941796/awards (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x5369cc70>: Failed to establish a new connection: [Errno 113] No route to host',))
  • 2 more successful
  • some errors
  • 2 more successful
https://paste.kodi.tv/cixayucure.kodi

hope this helps and thanks again
(2019-11-25, 16:32)axlt2002 Wrote: [ -> ]
(2019-11-25, 13:08)Cinephile Wrote: [ -> ]So this is a stupid question but how do I manually run this app? Scheduling doesn't seem to work for me (nothing happens at the scheduled time) and the 'Run' button in the add-on menu is greyed out. If I select a single file via the context menu it works flawlessly but would like to update the entire library.
Hi @Cinephile, thanks for your post!

Which version of the add-on are you using? I never had issues with the scheduling...once changed the scheduling time (i.e. day and time), please go to the settings.xml file under the userdata\addon_data folder, open it and check the "WeekDay" and "DayTime" values. Pleas report me back what you find compared to the time at which you set the new scheduling.

Anyway, to run the add-on for a library update, just click (or press enter) on the add-on icon under the Add-ons menu in the Home screen of Kodi.

Cheers,

Alex  
Thanks, Alex!

That clears things up. I was confused because Aeon MQ8 does not have an add-ons menu in the home screen by default. So I needed to switch to Estuary, run the add-on and switch back to MQ. Could this potentially by adjusted so that it can also by activated via settings -> add-ons -> run?
(2019-11-27, 04:42)Cinephile Wrote: [ -> ]
(2019-11-25, 16:32)axlt2002 Wrote: [ -> ]
(2019-11-25, 13:08)Cinephile Wrote: [ -> ]So this is a stupid question but how do I manually run this app? Scheduling doesn't seem to work for me (nothing happens at the scheduled time) and the 'Run' button in the add-on menu is greyed out. If I select a single file via the context menu it works flawlessly but would like to update the entire library.
Hi @Cinephile, thanks for your post!

Which version of the add-on are you using? I never had issues with the scheduling...once changed the scheduling time (i.e. day and time), please go to the settings.xml file under the userdata\addon_data folder, open it and check the "WeekDay" and "DayTime" values. Pleas report me back what you find compared to the time at which you set the new scheduling.

Anyway, to run the add-on for a library update, just click (or press enter) on the add-on icon under the Add-ons menu in the Home screen of Kodi.

Cheers,

Alex    
Thanks, Alex!

That clears things up. I was confused because Aeon MQ8 does not have an add-ons menu in the home screen by default. So I needed to switch to Estuary, run the add-on and switch back to MQ. Could this potentially by adjusted so that it can also by activated via settings -> add-ons -> run?  
Hi @Cinephile,

The add-on is really intended to run as a service so that is why there is no Run button enabled in its settings. Instead of switching to Estuary, doesn't Aeon MQ8 have the possiblity to add a widget with the installed add-ons in the home menu?

Anyway, I'm interested into understand why the scheduled update doesn't work for you. Can you please make the trial I have suggested in my post? Just take a note about the time you change the setting, to which date you set the update and check in the settings.xml what is written.

Thanks!
(2019-11-26, 22:22)zerocool_ie Wrote: [ -> ]
(2019-11-25, 16:39)axlt2002 Wrote: [ -> ]
(2019-11-22, 22:53)zerocool_ie Wrote: [ -> ]hi @axlt2002 

Running 4.0.2

update.log & kodi.log
wokakarute.kodi (paste)

Stuck on Jumanji: Welcome to the Jungle this time.

thanks for investigating!                     
Hi @zerocool_ie, thanks for your further logs.

It seems there is an issue in the code I use to generate the log file. Anyway, what sounds strange to me, is that you wrote "Stuck on Jumanji: Welcome to the Jungle this time.". Does this mean that the issue is not always happening at the same time (i.e. same movie)? If it is the case, I think it could be related to a network connection issue...if the error is not systematic (i.e. can not be replayed), maybe is related to some conditions that have changed since the last time. Slow network come to my mind...

Can you please try to update Jumanji from the context menu and report me back if it works? Please also run another library update and check where it does go stuck...

Thanks,

Alex

P.S.: I will anyway fix the bug in the log file in the next version.                   


hi @axlt2002 

 
Quote:Does this mean that the issue is not always happening at the same time (i.e. same movie)?
Yes, seems random.


Context update on Jumanji: Welcome to the Jungle
Looked to go well, at least no errors.
https://paste.kodi.tv/ferericupi.kodi

Full update
  • 376 successful
  • errors
    interesting:
    Code:
    Error Contents: HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /title/tt5941796/awards (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x5369cc70>: Failed to establish a new connection: [Errno 113] No route to host',))
  • 2 more successful
  • some errors
  • 2 more successful
https://paste.kodi.tv/cixayucure.kodi

hope this helps and thanks again 
Hi @zerocool_ie, thanks for the update. Well, it looks really like is related to some issue accessing the site...and its not related to the add-on itself, so I fear that there is nothing I can do...

I'm going to release a new version by today in which I have fix (hopefully) the bug in the log file...may be it will help to understand better which could be the issue.

Cheers!
Hi guys,

Just to let you know that I'm actually working on a new release that will merge the two concurrent versions of Light IMDb Ratings Update; the idea is to have a setting through which the user can choose between two TV show update methods: "IMDb TV show basis" (i.e. version 4.x) or "IMDb episode basis" (i.e. version 3.x) . Maintain two different version will be too much time consuming, especially in the optic to the passage to python 3 that will be requested for Kodi 19. Hope you will appreciate this work!  Nod

As a first step towards the integration, I have released a new version with the following changelog:

v4.1.0 (2019-12-02)
  • Added back IMDb, TMDB and TVDB IDs in the context menu for episodes
  • Reverted to the rating update method based on IMDb ID for single episode 
  • Fixed bug in log file

This version adds back the possibility to update the rating of a single episode (through the context menu) referring to its IMDb ID, so that any special case (e.g. pilot, special, personalized episodes) can be handled in this way. Edit of the different IDs for a single episode is again possible.

As usual, please do not hesitate to report back any bug may appear...  Eek

Have a great day!
Thanks! Will this work on Kodi M already?

Update: Nope, just checked.
(2019-12-02, 11:44)axlt2002 Wrote: [ -> ]Hi guys,

Just to let you know that I'm actually working on a new release that will merge the two concurrent versions of Light IMDb Ratings Update; the idea is to have a setting through which the user can choose between two TV show update methods: "IMDb TV show basis" (i.e. version 4.x) or "IMDb episode basis" (i.e. version 3.x) . Maintain two different version will be too much time consuming, especially in the optic to the passage to python 3 that will be requested for Kodi 19. Hope you will appreciate this work!  Nod

As a first step towards the integration, I have released a new version with the following changelog:

v4.1.0 (2019-12-02)
  • Added back IMDb, TMDB and TVDB IDs in the context menu for episodes
  • Reverted to the rating update method based on IMDb ID for single episode 
  • Fixed bug in log file

This version adds back the possibility to update the rating of a single episode (through the context menu) referring to its IMDb ID, so that any special case (e.g. pilot, special, personalized episodes) can be handled in this way. Edit of the different IDs for a single episode is again possible.

As usual, please do not hesitate to report back any bug may appear...  Eek

Have a great day! 
It's much appreciated...
I tried installing 4.1.0 in Kodi 17.6 (3D MVC build) and it looks like there's a python 2.26.0* dependency which isn't being met.  Is this an expected result because it's 17.6?

* This is what appeared to flash at the top when I tried to install it, but I may have read it wrong as the message was gone pretty quickly.  I didn't take the time to open the logs yet.  If this isn't an expected result, then I'll look into it further and provide more info for you.
(2019-12-03, 09:18)Skirge01 Wrote: [ -> ]I tried installing 4.1.0 in Kodi 17.6 (3D MVC build) and it looks like there's a python 2.26.0* dependency which isn't being met.  Is this an expected result because it's 17.6?

* This is what appeared to flash at the top when I tried to install it, but I may have read it wrong as the message was gone pretty quickly.  I didn't take the time to open the logs yet.  If this isn't an expected result, then I'll look into it further and provide more info for you.
Hi @Skirge01, thanks for spotting this out! I will revert back to the previous python version in order to guarantee the dependency with Kodi 17.x. Sorry for the inconvenience, but I was not aware of it.

Cheers!