-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trakt API Limits: API didn't respond properly, script will abort now #2162
Comments
enable debug log and report again |
What I see is that trakt invented new status code 420
|
https://trakt.docs.apiary.io/#introduction/status-codes
|
Why do some succeed and others fail then? If its a limit exceeded wouldn't everything fail? Some new things sync and other new things fail to sync Also I don't see a 420 error in the output unless its not logged Edit |
I've turned on debug and still I don't see any 420 error on my output after running it through a few time I'm no longer getting
But I am getting all the other errors
And it did actually sync my watched history |
ah I see the issue Its a rate limit issue - its trying to sync too fast Can you set a rate limiter on so it sends the requests more slowly - add a wait of a second or two between requests and then see if that works |
@purplescorpion1 doesn't look like you even looked at debug log, it's a file, not terminal output. |
From my testing, most of the syncing succeeds, scrobbling, mark as watched, rate, but adding to collection gives 420 error the error response is not much useful. all I can extract is that some limit is 100 420 response headers dump {
'Date': 'Mon, 27 Jan 2025 20:20:04 GMT',
'Content-Type': 'application/json',
'Transfer-Encoding': 'chunked',
'Connection': 'keep-alive',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0',
'x-content-type-options': 'nosniff',
'x-download-options': 'noopen',
'x-permitted-cross-domain-policies': 'none',
'referrer-policy': 'strict-origin-when-cross-origin',
'x-upgrade-url': 'https://trakt.tv/vip',
'x-vip-user': 'false',
'x-account-limit': '100',
'vary': 'Accept-Encoding',
'Content-Encoding': 'gzip',
'x-ratelimit': '{"name":"AUTHED_API_POST_LIMIT","period":1,"limit":1,"remaining":0,"until":"2025-01-27T20:20:05Z"}',
'Cache-Control': 'no-cache',
'Set-Cookie': '_traktsession=*redacted*; path=/; HttpOnly; SameSite=Lax',
'x-request-id': '*redacted*',
'x-runtime': '0.016574',
'cf-cache-status': 'DYNAMIC',
'Server': 'cloudflare',
'CF-RAY': '*redacted*',
'alt-svc': 'h3=":443"; ma=86400'
} |
oh I see it in the file log - I was expecting a debug output in the console yes there is a 420 error there and also getting rate limit errors
|
It seems to me that if you retry an action that got 420, it will be promoted immediately to rate limit error |
So, it's likely this update:
but I don't understand what rate limit of 100 I'm hitting when I'm just registering collection? I can have only 100 items in trakt collection? that's absurd! |
Looks like this is the end of this project. No way I'm interested in trakt if the previous unlimited collection size is limited to just 100 items. I don't care (much) about other features, as I don't hit their limits (yet). |
Yes, I agree here, adding it to collections was a great part of using this project, but I'd like to mention if you update your configs to no longer deal with the collection then you won't get any errors and the scrobbling part of the project still works as is. The code still probably needs to get updated so it doesn't retry upon receiving 420 error message and probably mention a warning somewhere about the collection being limited to only 100 items. |
I agree.
I agree too. |
Even if collections and watchlists and such are now limited on the Trakt end and I have to turn them off, as far as I am aware this project is still the only viable free way to deal with scrobbling. Obviously nobody is owed anything and passion projects are subject to the whims of the passionate, but I'm sure hoping this piece at least continues to be maintained. At least until Trakt breaks that, too. |
Can someone describe what would the behavior of AccountLimitExceeded be? The only action to take is IMHO to exit program. as doing anything else (continuing or retrying) will get you rate limited and maybe even blocked, which is not good at all Saved my draft here: |
Hitting the limit on a list doesn't mean you can't move on to toggle watched status of other items or add/remove items in other lists. Suggestion : When AccountLimitExceeded on a list, just stop POSTing to that list (kind of blacklist the list until end of current sync) and move on to next sync action. |
For me it's not a collection issue. Nothing is updating on Trakt since this started happening. |
I disabled plex_to_trakt: collection setting and it runs without error and everything I have watched still syncs |
Confirmation
The problem
Possible linked to #2159
Using version 0.33.0
Although it does eventually work I get a lot of warnings and errors
It tried two times then carried on
Then I get loads of
Other responses succeed but some get
Then it succeeds in some more and others get the above error
Think the last run I did was last week on version 0.32.7 and no issues there so something has either changed in the script or the API
Steps to reproduce the behavior
run plextraktsync sync
Error trace / logs
Expected behavior
no errors an everything sync
Inspect of problematic items
Workarounds
No response
Config file contents
Install method
pipx
Version
0.33.0
Python Version
3.12.8
Plex Server Version
1.41.4.9380-34f46d871
Operating System and Version
termux 0.119.0 running on android tv 9.1.2
The text was updated successfully, but these errors were encountered: