Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trakt Lists are causing a crash.

amphoterism opened this issue · comments

Confirmation

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

The problem

Begin with the command "plextraktsync sync" it starts to process through the lists, but crashes before syncing.

Steps to reproduce the behavior

Download fresh run of plextraktsync, perform the login on plex and trakt. Try to sync and it crashes.

Error trace / logs

2024-02-15 14:23:33,734 INFO[PlexTraktSync]:PlexTraktSync [0.28.18]
2024-02-15 14:23:33,902 INFO[PlexTraktSync.PlexServerConnection]:Connecting with url: https://192-168-1-45.68066492cb6a4b679b238e80a4bcde1d.plex.direct:32400, timeout 30 seconds
2024-02-15 14:23:34,037 INFO[PlexTraktSync]:Sync Movie sections: ['Movies']
2024-02-15 14:23:34,041 INFO[PlexTraktSync]:Sync Show sections: ['TV Shows']
2024-02-15 14:23:38,111 INFO[PlexTraktSync.TraktUserList]:Downloaded Trakt list 'Halloween' (9 items): https://trakt.tv/lists/827120
2024-02-15 14:23:38,245 ERROR[PlexTraktSync]:Internal Server Error
Traceback (most recent call last):
  File "/app/plextraktsync/cli.py", line 26, in wrap
    cmd(*args, **kwargs)
  File "/app/plextraktsync/commands/sync.py", line 68, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "/app/plextraktsync/sync.py", line 69, in sync
    trakt_lists.add_to_lists(movie)
  File "/app/plextraktsync/trakt/TraktUserListCollection.py", line 25, in add_to_lists
    tl.add(m)
  File "/app/plextraktsync/trakt/TraktUserList.py", line 86, in add
    rank = self.items.get((m.media_type, m.trakt_id))
           ^^^^^^^^^^
  File "/app/plextraktsync/trakt/TraktUserList.py", line 44, in items
    self.description, self._items = self.load_items()
                                    ^^^^^^^^^^^^^^^^^
  File "/app/plextraktsync/trakt/TraktUserList.py", line 50, in load_items
    userlist = LazyUserList._get(self.name, self.trakt_id)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/trakt/core.py", line 579, in inner
    json_data = self._handle_request('get', url)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/trakt/core.py", line 551, in _handle_request
    raise self.error_map[response.status_code](response)
trakt.errors.TraktInternalException: Internal Server Error
2024-02-15 14:23:46,906 INFO[PlexTraktSync]:PlexTraktSync [0.28.18]
2024-02-15 14:23:47,073 INFO[PlexTraktSync.PlexServerConnection]:Connecting with url: https://192-168-1-45.68066492cb6a4b679b238e80a4bcde1d.plex.direct:32400, timeout 30 seconds
2024-02-15 14:23:47,351 INFO[PlexTraktSync]:Sync Movie sections: ['Movies']
2024-02-15 14:23:47,354 INFO[PlexTraktSync]:Sync Show sections: ['TV Shows']
2024-02-15 14:23:51,458 INFO[PlexTraktSync.TraktUserList]:Downloaded Trakt list 'Halloween' (9 items): https://trakt.tv/lists/827120
2024-02-15 14:23:51,503 ERROR[PlexTraktSync]:Internal Server Error
Traceback (most recent call last):
  File "/app/plextraktsync/cli.py", line 26, in wrap
    cmd(*args, **kwargs)
  File "/app/plextraktsync/commands/sync.py", line 68, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "/app/plextraktsync/sync.py", line 69, in sync
    trakt_lists.add_to_lists(movie)
  File "/app/plextraktsync/trakt/TraktUserListCollection.py", line 25, in add_to_lists
    tl.add(m)
  File "/app/plextraktsync/trakt/TraktUserList.py", line 86, in add
    rank = self.items.get((m.media_type, m.trakt_id))
           ^^^^^^^^^^
  File "/app/plextraktsync/trakt/TraktUserList.py", line 44, in items
    self.description, self._items = self.load_items()
                                    ^^^^^^^^^^^^^^^^^
  File "/app/plextraktsync/trakt/TraktUserList.py", line 50, in load_items
    userlist = LazyUserList._get(self.name, self.trakt_id)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/trakt/core.py", line 579, in inner
    json_data = self._handle_request('get', url)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/trakt/core.py", line 551, in _handle_request
    raise self.error_map[response.status_code](response)
trakt.errors.TraktInternalException: Internal Server Error

Expected behavior

Sync with Trakt. This is present through cmd line and through my docker container.

Inspect of problematic items

No response

Workarounds

If I disable anything list related it works fine.

Install method

pipx

Config file contents

No response

Version

0.28.18

Python Version

3.10.4

Plex Server Version

1.40.0.7998-c29d4c0c8

Operating System and Version

Windows 10 / Docker Container

I believe I am having the same issue (Total Beginner). How do you disable list syncing so I can try to see if it is the same issue?

Thank you so much. I can confirm I am having the same issue.

Same problem here. Deactivating the lists, temporarily solves the problem

trakt.errors.TraktInternalException: Internal Server Error indicates there's a problem with trakt site.

This should be reported to their support

you probably should enable debug logging and see what the last request made to trakt.tv site was when you report it to trakt support.

whatever was causing the bug before has been fixed by trakt.