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

Plextraktsync crashes right after sync starts #886

Closed
2 tasks done
DjShugaA opened this issue Apr 13, 2022 · 18 comments
Closed
2 tasks done

Plextraktsync crashes right after sync starts #886

DjShugaA opened this issue Apr 13, 2022 · 18 comments
Labels
trakt support Issues that are related to problems with trakt.tv api

Comments

@DjShugaA
Copy link

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists

The problem

Sync stops after a short time

Error trace / logs

Processing TV Serier   0% ━━━━━━━━━━━━━━━━ 0/498  [ 0:00:49 < -:--:-- , ? it/s ]
Traceback (most recent call last):
  File "/home/kenneth/.local/bin/plextraktsync", line 8, in <module>
    sys.exit(cli())
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/commands/sync.py", line 60, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/sync.py", line 77, in sync
    self.sync_watched(episode, dry_run=dry_run)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/sync.py", line 130, in sync_watched
    if m.watched_on_plex is m.watched_on_trakt:
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/media.py", line 114, in watched_on_trakt
    watched = self.trakt_api.watched_shows
  File "/usr/lib64/python3.10/functools.py", line 981, in __get__
    val = self.func(instance)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/decorators/nocache.py", line 12, in inner
    return method(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/decorators/rate_limit.py", line 25, in wrapper
    return fn(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/trakt_api.py", line 161, in watched_shows
    return pytrakt_extensions.allwatched()
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/trakt/core.py", line 552, in inner
    json_data = self._handle_request('get', url)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/trakt/core.py", line 532, in _handle_request
    json_data = json.loads(response.content.decode('UTF-8', 'ignore'))
  File "/usr/lib64/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Expected behavior

Not crash

Steps to reproduce the behavior

start sync

Inspect of problematic items

PlexTraktSync [0.19.1]

Traceback (most recent call last):
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests/models.py", line 384, in prepare_url
    scheme, auth, host, port, path, query, fragment = parse_url(url)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/urllib3/util/url.py", line 394, in parse_url
    return six.raise_from(LocationParseError(source_url), None)
  File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: https://192-168-140-2.5f5ce133bf684ac0a86cbb8affdac038.plex.direct:32400ID

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kenneth/.local/bin/plextraktsync", line 8, in <module>
    sys.exit(cli())
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/commands/inspect.py", line 115, in inspect
    inspect_media(id)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/commands/inspect.py", line 32, in inspect_media
    pm = plex.fetch_item(id)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/decorators/nocache.py", line 12, in inner
    return method(*args, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plextraktsync/plex_api.py", line 501, in fetch_item
    media = self.plex.library.fetchItem(key)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plexapi/base.py", line 173, in fetchItem
    data = self._server.query(ekey)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/plexapi/server.py", line 672, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests/sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests_cache/session.py", line 115, in request
    return super().request(method, url, headers=headers, **kwargs)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests/sessions.py", line 515, in request
    prep = self.prepare_request(req)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests/sessions.py", line 443, in prepare_request
    p.prepare(
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests/models.py", line 318, in prepare
    self.prepare_url(url, params)
  File "/home/kenneth/.local/pipx/venvs/plextraktsync/lib64/python3.10/site-packages/requests/models.py", line 386, in prepare_url
    raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: https://192-168-140-2.5f5ce133bf684ac0a86cbb8affdac038.plex.direct:32400ID

Workarounds

dont know how / linux beginner

Install method

pipx (Recommended)

Version

0.19.1

Python Version

3.10.4

Operating System and Version

Fedora 35

@killtheplanet
Copy link

killtheplanet commented Apr 13, 2022

A me-too - I think the same issue (JSONDecodeError regardless) for 0.19.1

Processing Movies  99% ━━━━━━━━━━━╸ 9,925/9,976 [ 0:16:25 < 0:00:01 , 138 it/s ]
INFO     Movies processed in 16 min 25.9 seconds                                
Processing TV Shows   0% ━━━━━━━━━━━━━━━ 0/1,953  [ 0:00:14 < -:--:-- , ? it/s ]
Traceback (most recent call last):
  File "/root/.local/bin/plextraktsync", line 8, in <module>
    sys.exit(cli())
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/cli.py", line 46, in cli
    sync()
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/commands/sync.py", line 60, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/sync.py", line 77, in sync
    self.sync_watched(episode, dry_run=dry_run)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/sync.py", line 130, in sync_watched
    if m.watched_on_plex is m.watched_on_trakt:
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/media.py", line 114, in watched_on_trakt
    watched = self.trakt_api.watched_shows
  File "/usr/lib/python3.8/functools.py", line 967, in __get__
    val = self.func(instance)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/decorators/nocache.py", line 12, in inner
    return method(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/decorators/rate_limit.py", line 25, in wrapper
    return fn(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/plextraktsync/trakt_api.py", line 161, in watched_shows
    return pytrakt_extensions.allwatched()
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/trakt/core.py", line 552, in inner
    json_data = self._handle_request('get', url)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/trakt/core.py", line 532, in _handle_request
    json_data = json.loads(response.content.decode('UTF-8', 'ignore'))
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Last few lines from the debug log:

2022-04-13 23:24:14,630 DEBUG[requests_cache.session]:Pre-cache checks for response from https://172-20-0-10.db6ea196e0484a1bae6460970b4241cf.plex.direct:32400/library/sections/2/all?includeGuids=1&push=1&show.userRating%3E%3E=-1&pop=1&X-Plex-Container-Start=0&X-Plex-Container-Size=100: {'disabled cache': True, 'disabled method': False, 'disabled status': False, 'disabled by filter': False, 'disabled by headers or expiration params': False}
2022-04-13 23:24:14,630 DEBUG[requests_cache.session]:Skipping cache write for URL: https://172-20-0-10.db6ea196e0484a1bae6460970b4241cf.plex.direct:32400/library/sections/2/all?includeGuids=1&push=1&show.userRating%3E%3E=-1&pop=1&X-Plex-Container-Start=0&X-Plex-Container-Size=100
2022-04-13 23:24:14,632 DEBUG[trakt.core]:get: https://api-v2launch.trakt.tv/users/redacted/ratings/episodes
2022-04-13 23:24:14,632 DEBUG[trakt.core]:headers: {'Content-Type': 'application/json', 'trakt-api-version': '2', 'trakt-api-key': 'redacted', 'Authorization': 'Bearer redacted'}
2022-04-13 23:24:14,632 DEBUG[trakt.core]:method, url :: get, https://api-v2launch.trakt.tv/users/redacted/ratings/episodes
2022-04-13 23:24:14,633 DEBUG[requests_cache.cache_keys]:Invalid JSON body:
Traceback (most recent call last):
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/requests_cache/cache_keys.py", line 165, in normalize_json_body
    body = json.loads(decode(original_body))
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-04-13 23:24:14,633 DEBUG[requests_cache.cache_control]:Cache directives from request headers: {}
2022-04-13 23:24:16,256 DEBUG[urllib3.connectionpool]:https://api-v2launch.trakt.tv:443 "GET /users/redacted/ratings/episodes HTTP/1.1" 200 None
2022-04-13 23:24:16,257 DEBUG[requests_cache.session]:Pre-cache checks for response from https://api-v2launch.trakt.tv/users/redacted/ratings/episodes: {'disabled cache': True, 'disabled method': False, 'disabled status': False, 'disabled by filter': False, 'disabled by headers or expiration params': False}
2022-04-13 23:24:16,257 DEBUG[requests_cache.session]:Skipping cache write for URL: https://api-v2launch.trakt.tv/users/redacted/ratings/episodes
2022-04-13 23:24:16,257 DEBUG[trakt.core]:RESPONSE [get] (https://api-v2launch.trakt.tv/users/redacted/ratings/episodes): <Response [200]>
2022-04-13 23:24:16,257 DEBUG[trakt.core]:get: https://api-v2launch.trakt.tv/sync/watched/shows
2022-04-13 23:24:16,257 DEBUG[trakt.core]:headers: {'Content-Type': 'application/json', 'trakt-api-version': '2', 'trakt-api-key': 'redacted', 'Authorization': 'Bearer redacted'}
2022-04-13 23:24:16,257 DEBUG[trakt.core]:method, url :: get, https://api-v2launch.trakt.tv/sync/watched/shows
2022-04-13 23:24:16,258 DEBUG[requests_cache.cache_keys]:Invalid JSON body:
Traceback (most recent call last):
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.8/site-packages/requests_cache/cache_keys.py", line 165, in normalize_json_body
    body = json.loads(decode(original_body))
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-04-13 23:24:16,258 DEBUG[requests_cache.cache_control]:Cache directives from request headers: {}
2022-04-13 23:24:24,840 DEBUG[urllib3.connectionpool]:https://api-v2launch.trakt.tv:443 "GET /sync/watched/shows HTTP/1.1" 502 None
2022-04-13 23:24:24,841 DEBUG[requests_cache.session]:Pre-cache checks for response from https://api-v2launch.trakt.tv/sync/watched/shows: {'disabled cache': True, 'disabled method': False, 'disabled status': True, 'disabled by filter': False, 'disabled by headers or expiration params': False}
2022-04-13 23:24:24,841 DEBUG[requests_cache.session]:Skipping cache write for URL: https://api-v2launch.trakt.tv/sync/watched/shows
2022-04-13 23:24:24,841 DEBUG[trakt.core]:RESPONSE [get] (https://api-v2launch.trakt.tv/sync/watched/shows): <Response [502]>

Always on the TV section.

@LargeTalons
Copy link

Following. Im having this same issue and I thought it was me.

@glensc
Copy link
Collaborator

glensc commented Apr 14, 2022

Workarounds

  • don't know how / linux beginner

how about testing with older versions?

@glensc
Copy link
Collaborator

glensc commented Apr 14, 2022

"Inspect of problematic items" and the main bugreport: Include command that was invoked that resulted those errors.

@glensc
Copy link
Collaborator

glensc commented Apr 14, 2022

JSONDecodeError (in bug report body) indicates something happening on trakt.tv api side, out of our control. it may just go away at some point.

however, there's pull request to improve reporting:

which waits for this pull request:

you can voice your interest in (politely please):

@glensc
Copy link
Collaborator

glensc commented Apr 14, 2022

"DEBUG[requests_cache.cache_keys]:Invalid JSON body" this can be ignored. it's already known and request_cache does not plan to do anything about it:

@BaukeZwart
Copy link

BaukeZwart commented Apr 14, 2022

how about testing with older versions?

I tried reverting back to 0.18.30, same error.

@glensc
Copy link
Collaborator

glensc commented Apr 14, 2022

trakt.tv is giving 502 responses for those requests:

you need to contact trakt.tv support. be sure to cross-reference or keep this issue up to date with your feedback.

@glensc glensc added the trakt support Issues that are related to problems with trakt.tv api label Apr 14, 2022
@eyarea51
Copy link

plextraktsync.log
I am having the same issue. I see everything that has been posted. I was on 18.20 when I started having an issue this morning, I then tried 19.1 same issue then tried 18.30 same issue. I attached my Log file after turning on Debug hoping this helps.

@simonc56
Copy link
Collaborator

It's a Trakt server issue. They're working on it. Just wait.

image
https://twitter.com/traktapi/status/1514602500090826762

@killtheplanet
Copy link

Had a couple of runs work well for me now - I see Trakt added some more servers and asked for more aggressive caching from app owners.

Thanks!

@glensc
Copy link
Collaborator

glensc commented Apr 15, 2022

@eyarea51 you leaked your trakt token by posting that trakt log. you should revoke that token.

you can voice your interest of fixing that in here:

@DjShugaA
Copy link
Author

DjShugaA commented Apr 15, 2022

Just synced my whole library, seems to work fine

@racincason
Copy link

racincason commented Apr 16, 2022

I am having the same issue. The issue is related for me to folders with commas in the folder name. If i remove the comma it will move to the next folder that has the error (within 2 or 4 of the failed sync file). It's not able to parse it for whatever reason. I've tried a few different times throughout the day and it's still failing on the items with commas. ","

Traceback (most recent call last):
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\__main__.py", line 18, in <module>
    cli()
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\cli.py", line 46, in cli
    sync()
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\commands\sync.py", line 60, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\sync.py", line 66, in sync
    for movie in walker.find_movies():
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\walker.py", line 247, in find_movies
    movie = self.mf.resolve_any(plex)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\media.py", line 175, in resolve_any
    m = self.resolve_guid(guid, show)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\media.py", line 197, in resolve_guid
    tm = self.trakt.find_by_guid(guid)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\trakt_api.py", line 242, in find_by_guid
    return self.search_by_id(guid.id, id_type=guid.provider, media_type=guid.type)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\decorators\rate_limit.py", line 25, in wrapper
    return fn(*args, **kwargs)
  File "C:\Users\USR\Downloads\PlexTraktSync-0.19.1\PlexTraktSync-0.19.1\plextraktsync\trakt_api.py", line 258, in search_by_id
    search = trakt.sync.search_by_id(
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\trakt\core.py", line 552, in inner
    json_data = self._handle_request('get', url)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\site-packages\trakt\core.py", line 532, in _handle_request
    json_data = json.loads(response.content.decode('UTF-8', 'ignore'))
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\USR\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@Deanosim
Copy link

Deanosim commented May 6, 2022

Just ran a sync on 0.19.1 and it appears to be working again, so I'm gonna guess whatever problem was happening on the Trakt server side has fixed itself or been fixed.
Not sure if others have had it start working but I only just tested after having disabled the cron running plextraktsync for a few weeks.

@almightiest
Copy link

I still have this issue with 0.19.2

@glensc
Copy link
Collaborator

glensc commented May 25, 2022

@eyarea51 did you revoke your leaked token? did you 👍🏿 the referenced issue? i don't see:

@glensc
Copy link
Collaborator

glensc commented May 25, 2022

and the other pytrakt pull/requests I referred in issue can be 👍🏿 as well to show the interest to its maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trakt support Issues that are related to problems with trakt.tv api
Projects
None yet
Development

No branches or pull requests

10 participants