Recurring error: TypeError: object of type 'Session' has no len()
doctarrwho opened this issue · 6 comments
Started seeing this issue a couple of days ago, since getting the latest update for the docker. The error continues to repeat every second. I haven't changed any configuration.
ERROR - Unexpected error getting data from session alert
Traceback (most recent call last):
File "/usr/local/pas/resources/skipper.py", line 316, in processAlert
if media and media.session and len(media.session) > 0 and media.session[0].location == 'lan':
TypeError: object of type 'Session' has no len()
Also confirmed that I don't get the error after setting the docker to use an older commit (ghcr.io/mdhiggins/plexautoskip-docker@sha256:553ebda88b91b7e312337b04272b34fc97264fb375e6e5685ef7984ed5470f76
).
Looks like PlexAPI updated to 4.12 with some breaking changes regarding sessions
https://github.com/pkkid/python-plexapi/releases/tag/4.12.0
Updated with this which fixes it
Updating the docker container now, should be ready for a fresh pull in a few minutes
This change will not be backwards compatible with the old versions of PlexAPI hence the updates of requirements.txt as well
Thanks! I'll test with the docker update and report back.
Published as of now, should be good to pull
No more errors after pulling latest. Thanks for the quick fix!