Skip to content

Crash in 0.35.11: TypeError "'NoneType' object is not iterable" in watched-shows / sync #2515

Description

@Patatra40

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if an identical issue or discussion already exists
  • I have tried downgrading to find version that can be used as a workaround

The problem

Version

PlexTraktSync 0.35.11
Docker

Problem

Both commands fail:

plextraktsync watched-shows
plextraktsync sync

with:

TypeError: 'NoneType' object is not iterable

The traceback points to:

self.seasons = {}
allCompleted = True

for season in seasons:

inside pytrakt_extensions.py.

Investigation

I verified the following:

  • Trakt authentication is valid.
  • Plex connection is valid.
  • healthcheck passes.
  • unmatched works.
  • Only watched-shows and sync crash.

I queried Trakt directly from inside the container:

GET /sync/watched/shows

The request returns HTTP 200.

The returned objects do not contain a seasons field, so ShowProgress.__init__() receives:

seasons=None

which causes:

for season in seasons:

to crash.

Temporary workaround

Adding

seasons = seasons or []

before the loop fixes the crash:

self.seasons = {}
seasons = seasons or []
allCompleted = True

for season in seasons:

After this change:

  • watched-shows works
  • sync completes successfully

Remaining issue

Every show is reported with:

Seasons: 0

so the workaround only prevents the crash.

It looks like the code no longer receives the season data it expects and probably needs additional handling.

Steps to reproduce the behavior

trakt sync

Error trace / logs


Expected behavior

seasons synced

Inspect of problematic items


Workarounds

No response

Config file contents

Install method

docker-compose

Version

latest as of july 3rd 2027

Python Version

?

Plex Server Version

latest QNAP qpkg

Operating System and Version

QTS latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions