Closed timothe closed 8 months ago
Enable debug, check logs!
Changed the config file to debug: true, I get the exact same repeating messages in the container log
well then, what is the last request to plex? should be id of your problematic item. based on so few information you give here we can't help you. put yourself in our context, what can we do with so few information?
My sincere apologies, me is dumb, me is looking at Docker logs and not the log file. In the latter, I see a repetition of:
2023-11-22 21:38:07,883 DEBUG[plexapi]:Alert: type size PlaySessionStateNotification
2023-11-22 21:38:07,883 DEBUG[PlexTraktSync.EventDispatcher]:{'type': 'playing', 'size': 1, 'PlaySessionStateNotification': [{'sessionKey': '211', 'clientIdentifier': '112abbdc55e5596c-com-plexapp-android', 'guid': 'com.plexapp.agents.thetvdb://81797/26/572?lang=en', 'ratingKey': '1969', 'url': '', 'key': '/library/metadata/1969', 'viewOffset': 1446396, 'playQueueItemID': 12327, 'playQueueID': 843, 'state': 'paused'}]}
2023-11-22 21:38:07,883 DEBUG[plexapi]:GET https://REDACTED.plex.direct:32400/library/sections
2023-11-22 21:38:07,885 DEBUG[requests_cache.policy.actions]:Cache directives from request headers: CacheDirectives()
2023-11-22 21:38:07,885 DEBUG[requests_cache.policy.expiration]:URL https://REDACTED.plex.direct:32400/library/sections matched pattern "*/library/sections": 3674576450094852
2023-11-22 21:38:07,885 DEBUG[requests_cache.policy.actions]:Pre-read cache checks: disabled by expiration
2023-11-22 21:38:07,885 DEBUG[requests_cache.policy.actions]:Post-read cache actions: CacheActions(expire_after=3674576450094852, send_request=True, skip_read=True)
2023-11-22 21:38:07,889 DEBUG[urllib3.connectionpool]:https://REDACTED.plex.direct:32400 "GET /library/sections HTTP/1.1" 200 520
2023-11-22 21:38:07,890 DEBUG[requests_cache.policy.actions]:Cache directives from response headers: CacheDirectives(no_cache=True)
2023-11-22 21:38:07,890 DEBUG[requests_cache.policy.actions]:Pre-write cache checks: disabled by expiration
2023-11-22 21:38:07,890 DEBUG[requests_cache.session]:Skipping cache write for URL: https://REDACTED.plex.direct:32400/library/sections
2023-11-22 21:38:07,891 ERROR[PlexTraktSync.EventDispatcher]:TypeError was raised: argument of type 'NoneType' is not iterable
2023-11-22 21:38:07,893 DEBUG[PlexTraktSync.EventDispatcher]:[' File "/app/plextraktsync/watch/EventDispatcher.py", line 37, in dispatch\n listener["listener"](event)\n', ' File "/app/plextraktsync/watch/WatchStateUpdater.py", line 140, in on_play\n m = self.find_by_key(event.key)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/watch/WatchStateUpdater.py", line 76, in find_by_key\n if pm.library is None:\n ^^^^^^^^^^\n', ' File "/usr/local/lib/python3.12/functools.py", line 995, in __get__\n val = self.func(instance)\n ^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/plex/PlexLibraryItem.py", line 92, in library\n if self.item.librarySectionID not in self.plex.library_sections:\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "/usr/local/lib/python3.12/functools.py", line 995, in __get__\n val = self.func(instance)\n ^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/decorators/flatten.py", line 15, in inner\n return dict(method(*args, **kwargs))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/plex/PlexApi.py", line 120, in library_sections\n if section.title in excluded_libraries:\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n']
2023-11-22 21:38:17,897 DEBUG[plexapi]:Alert: type size PlaySessionStateNotification
2023-11-22 21:38:17,897 DEBUG[PlexTraktSync.EventDispatcher]:{'type': 'playing', 'size': 1, 'PlaySessionStateNotification': [{'sessionKey': '211', 'clientIdentifier': '112abbdc55e5596c-com-plexapp-android', 'guid': 'com.plexapp.agents.thetvdb://81797/26/572?lang=en', 'ratingKey': '1969', 'url': '', 'key': '/library/metadata/1969', 'viewOffset': 1446396, 'playQueueItemID': 12327, 'playQueueID': 843, 'state': 'paused'}]}
2023-11-22 21:38:17,897 DEBUG[plexapi]:GET https://REDACTED.plex.direct:32400/library/sections
2023-11-22 21:38:17,899 DEBUG[requests_cache.policy.actions]:Cache directives from request headers: CacheDirectives()
2023-11-22 21:38:17,899 DEBUG[requests_cache.policy.expiration]:URL https://REDACTED.plex.direct:32400/library/sections matched pattern "*/library/sections": 3674576450094852
2023-11-22 21:38:17,899 DEBUG[requests_cache.policy.actions]:Pre-read cache checks: disabled by expiration
2023-11-22 21:38:17,899 DEBUG[requests_cache.policy.actions]:Post-read cache actions: CacheActions(expire_after=3674576450094852, send_request=True, skip_read=True)
2023-11-22 21:38:17,904 DEBUG[urllib3.connectionpool]:https://REDACTED.plex.direct:32400 "GET /library/sections HTTP/1.1" 200 520
2023-11-22 21:38:17,905 DEBUG[requests_cache.policy.actions]:Cache directives from response headers: CacheDirectives(no_cache=True)
2023-11-22 21:38:17,905 DEBUG[requests_cache.policy.actions]:Pre-write cache checks: disabled by expiration
2023-11-22 21:38:17,905 DEBUG[requests_cache.session]:Skipping cache write for URL: https://REDACTED.plex.direct:32400/library/sections
2023-11-22 21:38:17,906 ERROR[PlexTraktSync.EventDispatcher]:TypeError was raised: argument of type 'NoneType' is not iterable
2023-11-22 21:38:17,908 DEBUG[PlexTraktSync.EventDispatcher]:[' File "/app/plextraktsync/watch/EventDispatcher.py", line 37, in dispatch\n listener["listener"](event)\n', ' File "/app/plextraktsync/watch/WatchStateUpdater.py", line 140, in on_play\n m = self.find_by_key(event.key)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/watch/WatchStateUpdater.py", line 76, in find_by_key\n if pm.library is None:\n ^^^^^^^^^^\n', ' File "/usr/local/lib/python3.12/functools.py", line 995, in __get__\n val = self.func(instance)\n ^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/plex/PlexLibraryItem.py", line 92, in library\n if self.item.librarySectionID not in self.plex.library_sections:\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "/usr/local/lib/python3.12/functools.py", line 995, in __get__\n val = self.func(instance)\n ^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/decorators/flatten.py", line 15, in inner\n return dict(method(*args, **kwargs))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "/app/plextraktsync/plex/PlexApi.py", line 120, in library_sections\n if section.title in excluded_libraries:\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n']
PTS is throwing an error while on watch, no tracking is done anymore
"anymore" -> that means it worked before you changed something 😐
I see you removed all default excluded libraries in config.yml
, you shouldn't.
Keep at least one excluded library :
excluded-libraries:
- Private
Then the script will work as expected.
I could not remember doing any change, but you might be right 😕
This solved the issue! Tried with 3 different files with the result below. (HAMA support is lacking but didn't have any hope there)
INFO Listening for events!
wss://REDACTED.plex.direct:32400/:
INFO OAuth token has expired, refreshing now...
]0;PlexTraktSync: watch: REDACTED (1.32.6.7557-1cf77d501)INFO Starting AlertListener:
/websockets/notifications?X-Plex-Token=<hidden>
INFO Websocket connected
09:30:12+00:00
INFO OAuth token successfully refreshed, valid until 2024-02-22
INFO on_activity: <tmdb:122906:Movie:2352:About-Time>: Collected: False,
Watched: [Plex: False, Trakt: False]
INFO on_play: <Episode:2586:The-Walking-Dead:-Da-s01e06>: 0.000000%, State:
playing, Watched: False, LastViewed: None
]0;PlexTraktSync: Watching The Walking Dead: Daryl Dixon/s01e06/Coming Home (2023)INFO on_play: <Episode:2586:The-Walking-Dead:-Da-s01e06>: 0.000000%, State:
]0;PlexTraktSync: Watching The Walking Dead: Daryl Dixon/s01e06/Coming Home (2023)INFO on_play: <Episode:2586:The-Walking-Dead:-Da-s01e06>: 0.276995%, State:
]0;PlexTraktSync: Watching The Walking Dead: Daryl Dixon/s01e06/Coming Home (2023)INFO on_play: <Episode:2586:The-Walking-Dead:-Da-s01e06>: 0.338550%, State:
paused, Watched: False, LastViewed: None
]0;PlexTraktSync: watch: Nasputin (1.32.6.7557-1cf77d501)INFO on_play: <Episode:2586:The-Walking-Dead:-Da-s01e06>: 0.338550%, State:
stopped, Watched: False, LastViewed: None
]0;PlexTraktSync: watch: Nasputin (1.32.6.7557-1cf77d501)WARNING <Episode:2052:One-Piece-s27e588>: Skipping guid
<PlexGuid:com.plexapp.agents.thetvdb://81797/27/588?lang=en> not found
WARNING <Episode:2052:One-Piece-s27e588>: Skipping guid
on Trakt
INFO on_play: <Movie:2352:About-Time>: 44.703458%, State: playing, Watched:
False, LastViewed: 2023-11-24 09:30:12
]0;PlexTraktSync: Watching About Time (2013)INFO on_play: <Movie:2352:About-Time>: 44.771006%, State: paused, Watched:
]0;PlexTraktSync: watch: Nasputin (1.32.6.7557-1cf77d501)INFO on_play: <Movie:2352:About-Time>: 44.771006%, State: stopped, Watched:
Thank you so much!
Confirmation
The problem
PTS is throwing an error while on watch, no tracking is done anymore
Error trace / logs
Expected behavior
Detect the watched media and track it as intended
Steps to reproduce the behavior
Inspect of problematic items
No response
Workarounds
Didn't try to downgrade 😬 I have an automatic update system using watchtower
Install method
docker-compose
Config file contents
Version
0.27.11
Python Version
embedded
Operating System and Version
DSM 7