Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)
MIT License
1.62k stars 106 forks source link

plextraktsync terminated by API didn't respond properly #2025

Closed leokklai closed 3 weeks ago

leokklai commented 3 months ago

Confirmation

The problem

During sync, plextraktsync terminated by API didn't respond properly. The error log is shown:

2024-08-19 12:19:29,502 WARNING[plextraktsync.decorators.retry]:Internal Server Error for plextraktsync.trakt.TraktApi.search_by_id(), retrying after 1 seconds (try: 1/5)
2024-08-19 12:19:30,780 WARNING[plextraktsync.decorators.retry]:Internal Server Error for plextraktsync.trakt.TraktApi.search_by_id(), retrying after 2 seconds (try: 2/5)
2024-08-19 12:19:33,066 WARNING[plextraktsync.decorators.retry]:Internal Server Error for plextraktsync.trakt.TraktApi.search_by_id(), retrying after 3 seconds (try: 3/5)
2024-08-19 12:19:36,335 WARNING[plextraktsync.decorators.retry]:Internal Server Error for plextraktsync.trakt.TraktApi.search_by_id(), retrying after 4 seconds (try: 4/5)
2024-08-19 12:19:40,627 WARNING[plextraktsync.decorators.retry]:Internal Server Error for plextraktsync.trakt.TraktApi.search_by_id(), retrying after 5 seconds (try: 5/5)
2024-08-19 12:19:46,563 ERROR[plextraktsync.decorators.retry]:Error: Internal Server Error
2024-08-19 12:19:46,566 ERROR[plextraktsync.decorators.retry]:Error message: Internal server error. Please open a support issue and include your full API request and response, including all headers.
2024-08-19 12:19:46,569 ERROR[plextraktsync.decorators.retry]:Last call: plextraktsync.trakt.TraktApi.search_by_id(('2207604', 'tmdb', 'episode'), {})
2024-08-19 12:19:46,587 CRITICAL[plextraktsync.cli]:Error running sync command: API didn't respond properly, script will abort now. Please try again later.

I think it is due to the TV show with tmdb ID 2207604 that plextraktsync may not be supported. But how can I found which show with this ID?

Steps to reproduce the behavior

execute plextraktsync sync, the progress will be stopped at this point.

Expected behavior

plextraktsync terminated.

Inspect of problematic items

No response

Workarounds

No response

Config file contents

No response

Install method

docker-compose

Version

0.31.7

Python Version

3.12.4

Plex Server Version

1.29.2.6364

Operating System and Version

Synolgoy DSM 7.1

glensc commented 2 months ago

Removed duplicate logs section from bug report

glensc commented 2 months ago

I think it is due to the TV show with tmdb ID 2207604 that plextraktsync may not be supported. But how can I found which show with this ID?

did you enable debug logging and checking logs?

WillPresley commented 2 months ago

For what it's worth, I was also having this exact error for the last few days, but at some point in the last ~12 hours, it started working again on its own.

glensc commented 2 months ago

this is problem at trakt.tv api side, so they might have addressed problems.

you need to report problem to them

glensc commented 2 months ago

tmdb id 2207604 could be one of these:

glensc commented 2 months ago

enable debug log and see what request it makes with 2207604, and then use trakt-api.sh script from project root to make same request.

glensc commented 2 months ago

might be this request:

❯ ./trakt-api.sh 'https://api.trakt.tv/search/tmdb/2207604?type=episode'
curl: (22) The requested URL returned error: 500

you need to report this to trakt support.

Animosity022 commented 3 weeks ago

This seems to hard stop the sync, is there a flag / way / method to skip it and continue on? I reported the one I found as well.

Adding my support response which isn't really reassuring:

image

glensc commented 3 weeks ago

This is trakt side problem. seems none of you reported this to them.

still 500 error:

$ ./trakt-api.sh 'https://api.trakt.tv/search/tmdb/2207604?type=episode'
curl: (22) The requested URL returned error: 500
[{"type":"episode","score":1000,"episode":{"season":1,"number":3,"title":"I am well aware of your hard work.","ids":{"trakt":4121230,"tvdb":7697618,"imdb":null,"tmdb":2207604,"tvrage":null}},"show":{"title":"Crazy Over His Fingers: Just the Two of Us in a Salon After Closing","year":2020,"ids":{"trakt":160313,"slug":"crazy-over-his-fingers-just-the-two-of-us-in-a-salon-after-closing","tvdb":379925,"imdb":"tt12044826","tmdb":100937,"tvrage":null}}}]zsh: unknown file attribute: 2
glensc commented 3 weeks ago

looks like i was mistakenly copying previous error message as well

so, that specific one is fixed

$ ./trakt-api.sh 'https://api.trakt.tv/search/tmdb/2207604?type=episode'
[{"type":"episode","score":1000,"episode":{"season":1,"number":3,"title":"I am well aware of your hard work.","ids":{"trakt":4121230,"tvdb":7697618,"imdb":null,"tmdb":2207604,"tvrage":null}},"show":{"title":"Crazy Over His Fingers: Just the Two of Us in a Salon After Closing","year":2020,"ids":{"trakt":160313,"slug":"crazy-over-his-fingers-just-the-two-of-us-in-a-salon-after-closing","tvdb":379925,"imdb":"tt12044826","tmdb":100937,"tvrage":null}}}]
Animosity022 commented 2 weeks ago

This is trakt side problem. seems none of you reported this to them.

Seems like you didn't seem my response as the image is a response from Trakt Support.

Closing this out doesn't solve the error that it fails the sync and won't go paste it. If should log the error and progress as trakt srever problems should not blow up the sync.

glensc commented 2 weeks ago

There is pr:

but since nobody who wanted it responded, it's abandoned (might not work)