Skip to content
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 won't sync collection #2156

Closed
3 tasks done
Devineavenger opened this issue Jan 24, 2025 · 6 comments
Closed
3 tasks done

Trakt won't sync collection #2156

Devineavenger opened this issue Jan 24, 2025 · 6 comments

Comments

@Devineavenger
Copy link

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

Getting an error when running sync for the collection part of the sync.
Also, I tried enabling debug in config.yml, but nothing happens. No new debug lines in the log.

Everything else works. "watch" works and the sync works.

Steps to reproduce the behavior

run docker-compose run --rm plextraktsync sync

Error trace / logs

WARNING  Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 5 seconds (try: 5/5)
ERROR    Error: Bad Response - Response could not be parsed
ERROR    Details: Unable to parse JSON: Expecting value: line 1 column 1 (char 0)
ERROR    Last call: plextraktsync.queue.TraktBatchWorker.add_to_collection((defaultdict(<class 'list'>, {'movies': [{ "removed for security"}, 'collected_at': '2025-01-23T04:14:56.000Z', 'media_type': 'digital', 'resolution': 'hd_1080p', 'audio': 'aac', 'audio_channels':
         '2.0'}, { "removed for security" }, 'collected_at': '2025-01-23T04:14:55.000Z',
         'media_type': 'digital', 'resolution': 'hd_1080p', 'audio_channels': '5.1'}]}),), {})
ERROR    Got exception while working on <plextraktsync.queue.TraktBatchWorker.TraktBatchWorker object at 0x7f4ab809e7b0>: API didn't respond properly, script will abort now. Please try again later.
WARNING  Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 1 seconds (try: 1/5)

Expected behavior

I expect it to add the collection to trakt

Inspect of problematic items


Workarounds

No response

Config file contents

# Config File: /app/config/config.yml
cache:
  path: /app/config/trakt_cache
excluded-libraries:
- Self-Help
- Documentaries
config:
  dotenv_override: true
plex:
  timeout: 30
logging:
  append: true
  console_time: false
  debug: true
  filename: plextraktsync.log
  filter_loggers: null
  filter: null
sync:
  rating_priority: plex
  plex_to_trakt:
    collection: true
    clear_collected: false
    ratings: true
    watched_status: true
    watchlist: true
  trakt_to_plex:
    liked_lists: true
    ratings: true
    watched_status: true
    watchlist: true
    watchlist_as_playlist: false
    playback_status: false
liked_lists:
  keep_watched: true
watch:
  add_collection: false
  remove_collection: false
  scrobble_threshold: 80
  username_filter: true
  media_progressbar: true
  ignore_clients: null
xbmc-providers:
  movies: imdb
  shows: tvdb

Install method

docker-compose

Version

0.33

Python Version

3.13.1 (main, Dec 4 2024, 20:31:07) [GCC 13.2.1 20231014]

Plex Server Version

1.41.3.9314

Operating System and Version

Debian 12

@Untimed4598
Copy link

Untimed4598 commented Jan 24, 2025

This started happening recently with me too. Here are some logs and info about my environment for reference.

Error Logs

2025-01-24 17:02:26,768 INFO[plextraktsync.watch.WatchStateUpdater]:on_activity: <tmdb:[REDACTED]:Movie:[REDACTED]:[REDACTED]>: Collected: False, Watched: [Plex: False, Trakt: False]
2025-01-24 17:02:26,771 INFO[plextraktsync.watch.WatchStateUpdater]:on_activity: Add /library/metadata/[REDACTED] to collection: <tmdb:[REDACTED]:Movie:[REDACTED]:[REDACTED]>
2025-01-24 17:02:27,988 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 1 seconds (try: 1/5)
2025-01-24 17:02:29,132 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 2 seconds (try: 2/5)
2025-01-24 17:02:31,272 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 3 seconds (try: 3/5)
2025-01-24 17:02:34,402 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 4 seconds (try: 4/5)
2025-01-24 17:02:38,540 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 5 seconds (try: 5/5)
2025-01-24 17:02:43,681 ERROR[plextraktsync.decorators.retry]:Error: Bad Response - Response could not be parsed
2025-01-24 17:02:43,683 ERROR[plextraktsync.decorators.retry]:Details: Unable to parse JSON: Expecting value: line 1 column 1 (char 0)
2025-01-24 17:02:43,685 ERROR[plextraktsync.decorators.retry]:Last call: plextraktsync.queue.TraktBatchWorker.add_to_collection((defaultdict(<class 'list'>, {'movies': [{'title': '[REDACTED]', 'year': 2024, 'ids': {'imdb': '[REDACTED]', 'slug': '[REDACTED]-2024', 'tmdb': [REDACTED], 'trakt': [REDACTED]}, 'collected_at': '2025-01-24T16:00:17.000Z', 'media_type': 'digital', 'resolution': 'uhd_4k', 'audio': 'dolby_digital_plus', 'audio_channels': '5.1'}]}),), {})
2025-01-24 17:02:43,689 ERROR[plextraktsync.queue.BackgroundTask]:Got exception while working on <plextraktsync.queue.TraktBatchWorker.TraktBatchWorker object at 0x7ff0e8881010>: API didn't respond properly, script will abort now. Please try again later.
2025-01-24 17:02:48,837 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 1 seconds (try: 1/5)
2025-01-24 17:02:50,004 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktBatchWorker.add_to_collection(), retrying after 2 seconds (try: 2/5)

Python Env

PlexTraktSync Version: 0.33.0
Python Version: 3.11.11 (main, Dec  9 2024, 18:25:14) [GCC 14.2.1 20241116]
Plex API Version: 4.16.1
Trakt API Version: 3.4.35

Config for watch

I have the app running using the watch command - plextraktsync watch

watch:
  add_collection: true
  remove_collection: false
  scrobble_threshold: 80
  username_filter: true
  media_progressbar: false
  ignore_clients: null

@Untimed4598
Copy link

Untimed4598 commented Jan 24, 2025

Okay I think I found the issue, it's most likely due to the recent changes to Trakt which the director has posted on the forum here, specifically this

  • Watchlist and Collection Limits: Free users are now limited to 100 items in their watchlists and collections, down from previous limits.

This at least aligns with the timeline of when I started to see the errors, the project most likely still needs to adapt to these changes. Also on a side note, I have so far 1300 items in my collection where this limit of 100 seems way too small.

@Devineavenger
Copy link
Author

Thank you!
You are right! It's a TRAKT problem!
I'm closing this.

@NanoBitrin
Copy link

Is there anything we can do to bypass this issue?

@Untimed4598
Copy link

Untimed4598 commented Jan 25, 2025

Is there anything we can do to bypass this issue?

As far as I can tell, I don’t think so. The limits have already been applied by Trakt and API calls are returning error messages when they’re exceeded, so I don’t believe we can do anything about it.

@glensc
Copy link
Collaborator

glensc commented Jan 27, 2025

Duplicate: #2162

Repository owner locked and limited conversation to collaborators Jan 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants