razzeee / context.trakt.addtowatchlist

GNU General Public License v2.0
4 stars 0 forks source link

Add to watchlist won't work in Kodi 18.2 #1

Open brtani opened 5 years ago

brtani commented 5 years ago

When I press the button nothing happens. I tried it several times Log: http://paste.kodi.tv/haraduqeqo

razzeee commented 5 years ago

Your logfile doesn't show an error.

I just tried the same with my linux setup and it works fine.

Btw if you want to create a log, see here https://github.com/trakt/script.trakt#creating-logfiles

brtani commented 5 years ago

Hello, I tried it second time

Here's the code

https://paste.kodi.tv/payetoxemo

I hope now it will be ok. If not I will need a little help with it

Thanks.

Dňa ne 19. 5. 2019, 21:31 Razzeee notifications@github.com napísal(a):

Your logfile doesn't show an error.

I just tried the same with my linux setup and it works fine.

Btw if you want to create a log, see here https://github.com/trakt/script.trakt#creating-logfiles

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Razzeee/context.trakt.addtowatchlist/issues/1?email_source=notifications&email_token=AI2PV5L6ZQ7GRUJSCGFAAFLPWGTKPA5CNFSM4HN46HPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVXI5XI#issuecomment-493784797, or mute the thread https://github.com/notifications/unsubscribe-auth/AI2PV5PJH44RDZYH262DGBTPWGTKPANCNFSM4HN46HPA .

razzeee commented 5 years ago

Are you using nfo files?

brtani commented 5 years ago

No, I'm not using them.

razzeee commented 5 years ago

are you using the default skin? can you please try with the default skin?

brtani commented 5 years ago

I tried default skin, nothing changed.

FallingReign commented 5 years ago

I'm having the same issue. Attempted to add a movie and a show/episode for a TV series to the watchlist and nothing happens.

Relevant debug log:

2019-06-05 10:33:49.812 T:32356   DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
2019-06-05 10:33:49.822 T:469   DEBUG: Thread LanguageInvoker start, auto delete: false
2019-06-05 10:33:49.824 T:469    INFO: initializing python engine.
2019-06-05 10:33:49.824 T:469   DEBUG: CPythonInvoker(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py): start processing
2019-06-05 10:33:49.850 T:469   DEBUG: -->Python Interpreter Initialized<--
2019-06-05 10:33:49.850 T:469   DEBUG: CPythonInvoker(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py): the source file to load is "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py"
2019-06-05 10:33:49.850 T:469   DEBUG: CPythonInvoker(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py): setting the Python path to /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist:/:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python27.zip:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/site-packages:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/plat-linux2:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/lib-tk:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/lib-old:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/lib-dynload
2019-06-05 10:33:49.850 T:469   DEBUG: CPythonInvoker(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py): entering source directory /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist
2019-06-05 10:33:49.851 T:469   DEBUG: CPythonInvoker(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py): instantiating addon using automatically obtained id of "context.trakt.addtowatchlist" dependent on version 2.26.0 of the xbmc.python api
2019-06-05 10:33:49.851 T:469    INFO: CPythonInvoker(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py): script successfully run
2019-06-05 10:33:49.851 T:469   DEBUG: onExecutionDone(25, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/context.trakt.addtowatchlist/addon.py)
2019-06-05 10:33:49.853 T:469    INFO: Python interpreter stopped
2019-06-05 10:33:49.853 T:469   DEBUG: Thread LanguageInvoker 469 terminating
2019-06-05 10:33:49.856 T:470   DEBUG: Thread LanguageInvoker start, auto delete: false
2019-06-05 10:33:49.857 T:470    INFO: initializing python engine.
2019-06-05 10:33:49.857 T:470   DEBUG: CPythonInvoker(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py): start processing
2019-06-05 10:33:49.880 T:470   DEBUG: -->Python Interpreter Initialized<--
2019-06-05 10:33:49.880 T:470   DEBUG: CPythonInvoker(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py): the source file to load is "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py"
2019-06-05 10:33:49.882 T:470   DEBUG: CPythonInvoker(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py): setting the Python path to /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.arrow/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.certifi/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.chardet/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.dateutil/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.idna/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.requests/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.six/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.trakt/lib:/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib:/:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python27.zip:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/site-packages:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/plat-linux2:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/lib-tk:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/lib-old:/data/app/org.xbmc.kodi-tlTHrQ3Q2u6D2OpVXFZiXw==/base.apk/assets/python2.7/lib/python2.7/lib-dynload
2019-06-05 10:33:49.882 T:470   DEBUG: CPythonInvoker(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py): entering source directory /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt
2019-06-05 10:33:49.882 T:470   DEBUG: CPythonInvoker(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py): instantiating addon using automatically obtained id of "script.trakt" dependent on version 2.26.0 of the xbmc.python api
2019-06-05 10:33:50.292 T:470    INFO: CPythonInvoker(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py): script successfully run
2019-06-05 10:33:50.292 T:470   DEBUG: onExecutionDone(26, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py)
2019-06-05 10:33:50.363 T:470    INFO: Python interpreter stopped
2019-06-05 10:33:50.363 T:470   DEBUG: Thread LanguageInvoker 470 terminating

Running Kodi 18.2 with Aura skin.

FallingReign commented 5 years ago

On further investigation it also appears that toggle watched option in the context menu addon also produces an error so I think the issue is primarily with the core trakt addon.

2019-06-05 11:04:50.172 T:1863   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: 'imdbnumber'
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py", line 14, in <module>
                                                Main()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/defaultscript.py", line 11, in Main
                                                script.run()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.trakt/resources/lib/script.py", line 171, in run
                                                data['id'] = result['imdbnumber']
                                            KeyError: 'imdbnumber'
                                            -->End of Python script error report<--
razzeee commented 5 years ago

Adding movies works fine for me. I seem to have problems adding tvshow episodes.

JWDebler commented 4 years ago

Same error message in regard to marking TV episodes as watched "error contents: 'imdbnumber'"

haibrini commented 4 years ago

I am also having the same issue, only with TV Series. Movies are syncing just fine. None of my tv series is syncing with trakt. Here is the output of "Toggle watched on trakt"

2019-10-23 00:49:38.558 T:3434083184 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: 'imdbnumber'
                                        Traceback (most recent call last):
                                          File "/storage/.kodi/addons/script.trakt/defaultscript.py", line 14, in <module>
                                            Main()
                                          File "/storage/.kodi/addons/script.trakt/defaultscript.py", line 11, in Main
                                            script.run()
                                          File "/storage/.kodi/addons/script.trakt/resources/lib/script.py", line 171, in run
                                            data['id'] = result['imdbnumber']
                                        KeyError: 'imdbnumber'
                                        -->End of Python script error report<--
BRTPOB commented 4 years ago

I'm having the same crash as above, however I'm not trying to sync (that seems to have worked fine), I'm trying to toggle an episode as watched on Trakt through the context menu.

2019-12-18 14:25:48.597 T:140571345942272   DEBUG: CPythonInvoker(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py): start processing
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: -->Python Interpreter Initialized<--
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: CPythonInvoker(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py): the source file to load is "/home/offspring/.kodi/addons/context.trakt.watched/addon.py"
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: CPythonInvoker(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py): setting the Python path to /home/offspring/.kodi/addons/context.trakt.watched:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: CPythonInvoker(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py): entering source directory /home/offspring/.kodi/addons/context.trakt.watched
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: CPythonInvoker(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py): instantiating addon using automatically obtained id of "context.trakt.watched" dependent on version 2.26.0 of the xbmc.python api
2019-12-18 14:25:48.636 T:140571345942272    INFO: CPythonInvoker(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py): script successfully run
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: onExecutionDone(16, /home/offspring/.kodi/addons/context.trakt.watched/addon.py)
2019-12-18 14:25:48.636 T:140571345942272    INFO: Python interpreter stopped
2019-12-18 14:25:48.636 T:140571345942272   DEBUG: Thread LanguageInvoker 140571345942272 terminating
2019-12-18 14:25:48.645 T:140571345942272   DEBUG: Thread LanguageInvoker start, auto delete: false
2019-12-18 14:25:48.645 T:140571345942272    INFO: initializing python engine.
2019-12-18 14:25:48.645 T:140571345942272   DEBUG: CPythonInvoker(17, /home/offspring/.kodi/addons/script.trakt/defaultscript.py): start processing
2019-12-18 14:25:48.685 T:140571345942272   DEBUG: -->Python Interpreter Initialized<--
2019-12-18 14:25:48.685 T:140571345942272   DEBUG: CPythonInvoker(17, /home/offspring/.kodi/addons/script.trakt/defaultscript.py): the source file to load is "/home/offspring/.kodi/addons/script.trakt/defaultscript.py"
2019-12-18 14:25:48.686 T:140571345942272   DEBUG: CPythonInvoker(17, /home/offspring/.kodi/addons/script.trakt/defaultscript.py): setting the Python path to /home/offspring/.kodi/addons/script.trakt:/home/offspring/.kodi/addons/script.module.arrow/lib:/home/offspring/.kodi/addons/script.module.backports.functools_lru_cache/lib:/home/offspring/.kodi/addons/script.module.certifi/lib:/home/offspring/.kodi/addons/script.module.chardet/lib:/home/offspring/.kodi/addons/script.module.dateutil/lib:/home/offspring/.kodi/addons/script.module.idna/lib:/home/offspring/.kodi/addons/script.module.requests/lib:/home/offspring/.kodi/addons/script.module.six/lib:/home/offspring/.kodi/addons/script.module.trakt/lib:/home/offspring/.kodi/addons/script.module.urllib3/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
2019-12-18 14:25:48.686 T:140571345942272   DEBUG: CPythonInvoker(17, /home/offspring/.kodi/addons/script.trakt/defaultscript.py): entering source directory /home/offspring/.kodi/addons/script.trakt
2019-12-18 14:25:48.686 T:140571345942272   DEBUG: CPythonInvoker(17, /home/offspring/.kodi/addons/script.trakt/defaultscript.py): instantiating addon using automatically obtained id of "script.trakt" dependent on version 2.26.0 of the xbmc.python api
2019-12-18 14:25:49.742 T:140572970956544   DEBUG: This query part contains a like, we will double backslash in the next field:  LIKE '
2019-12-18 14:25:57.768 T:140573470299904   DEBUG: Previous line repeats 5 times.
2019-12-18 14:25:57.768 T:140573470299904   DEBUG: CRecentlyAddedJob::UpdateMusic() - Running RecentlyAdded home screen update
2019-12-18 14:25:58.027 T:140573470299904   DEBUG: GetRecentlyAddedAlbumSongs() query: SELECT songview.*, songartistview.* FROM (SELECT idAlbum FROM album ORDER BY idAlbum DESC LIMIT 10) AS recentalbums JOIN songview ON songview.idAlbum = recentalbums.idAlbum JOIN songartistview ON songview.idSong = songartistview.idSong ORDER BY songview.idAlbum DESC, songview.idSong, songartistview.idRole, songartistview.iOrder
2019-12-18 14:25:58.853 T:140572970956544   DEBUG: This query part contains a like, we will double backslash in the next field:  LIKE '
2019-12-18 14:26:02.686 T:140571345942272   DEBUG: Previous line repeats 3 times.
2019-12-18 14:26:02.686 T:140571345942272   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: 'imdbnumber'
                                            Traceback (most recent call last):
                                              File "/home/offspring/.kodi/addons/script.trakt/defaultscript.py", line 14, in <module>
                                                Main()
                                              File "/home/offspring/.kodi/addons/script.trakt/defaultscript.py", line 11, in Main
                                                script.run()
                                              File "/home/offspring/.kodi/addons/script.trakt/resources/lib/script.py", line 171, in run
                                                data['id'] = result['imdbnumber']
                                            KeyError: 'imdbnumber'
                                            -->End of Python script error report<--
2019-12-18 14:26:02.686 T:140571345942272   DEBUG: onExecutionDone(17, /home/offspring/.kodi/addons/script.trakt/defaultscript.py)
2019-12-18 14:26:02.686 T:140574325725888   DEBUG: ------ Window Init (DialogNotification.xml) ------
2019-12-18 14:26:02.720 T:140571345942272    INFO: Python interpreter stopped
sepharg commented 4 years ago

Same thing happens to me, would appreciate a fix!

razzeee commented 4 years ago

I pushed some code for this, but I'm not sure when I will upstream it. There might still be a corner case, but from my testing, I got every case but one solved.

rahaaatul commented 1 year ago

@razzeee I have the same problem in Kodi 19.5. Here is the log file.

razzeee commented 1 year ago

@rahaaatul was that using the default kodi skin?

rahaaatul commented 1 year ago

@rahaaatul was that using the default kodi skin?

No, I'm using Arctic Zephyr Reloaded.

razzeee commented 1 year ago

Please try if you can replicate it with the default skin, at least some of the errors in your log seem to be due to that.

rahaaatul commented 1 year ago

Hi, I've just tried it with default skin, but it didn't work... screenshot00001

razzeee commented 1 year ago

Does that also happen in a normal listing provided by kodi or is that a TheMovieDb Helper specific thing?

razzeee commented 1 year ago

I've just tested with arctic and v20 and it's working for me

rahaaatul commented 1 year ago

Does that also happen in a normal listing provided by kodi or is that a TheMovieDb Helper specific thing?

Normal listing provided by Kodi is working fine, I can add to watchlist without any issue. It's just with other addons like MovieDB Helper or Otaku.

Edit: I'm on v19.5 BTW.

razzeee commented 1 year ago

Then I think it's those addons not correctly setting 'ListItem.DBID' on the listitem. Which they also not might be able to, as you might have no db entry.

rahaaatul commented 1 year ago

Oh! 🙁 What do you recommend if I don't have the files locally but want to add it to trakt watchlist from upcoming section?

verybigelephants commented 1 month ago

I can't seem to be able to make this work neither. It throws the same error, while all the other fetures of trakt are working properly for me. Like, when i go to "trakt options ->add to watchlist" from the main "script.trakt" addon it works. But when i do it directly via the "add to watchlist contxt menu" it shows that error:

2024-07-12 12:24:14.468 T:15898   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ValueError'>
                                                   Error Contents: invalid literal for int() with base 10: ''
                                                   Traceback (most recent call last):
                                                     File "/home/pi/.kodi/addons/script.trakt/defaultscript.py", line 14, in <module>
                                                       Main()
                                                     File "/home/pi/.kodi/addons/script.trakt/defaultscript.py", line 11, in Main
                                                       script.run()
                                                     File "/home/pi/.kodi/addons/script.trakt/resources/lib/script.py", line 362, in run
                                                       dbid = int(xbmc.getInfoLabel('ListItem.DBID'))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   ValueError: invalid literal for int() with base 10: ''
                                                   -->End of Python script error report<--

as ar as i understand xbmc.getInfoLabel('ListItem.DBID') should return the highlighted item's id https://kodi.wiki/view/InfoLabels

why would it work when going to "trakt options -> add to watchlist" but not when trying to use the direct "add to watchlist" addon? the log says that it uses the main codebase of script.trakt. maybe because this is a plugin that uses another plugin's codebase there is some lack of authorization to call xbmc.getInfoLabel or something

running kodi 20.3.0, with Arctic Fuse and TMDB helper btw, but i get the same error when i switch to default skin too