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

Unraid Docker Container Crashes Shortly After Startup

joecan00 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

Setup went smoothly, as did Trakt/Plex authorization. However it now crashes shorty after starting the docker container.

Latest version from Unraid "App Store".

Error trace / logs

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pp/plextraktsync/cli.py", line 69, in cli

sr/local/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
elf.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
f.invoke(ctx)
^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
tx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
_callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
pp/plextraktsync/cli.py", line 25, in wrap
s, **kwargs)
pp/plextraktsync/commands/sync.py", line 73, in sync
ync(walker=w, dry_run=config.dry_run)
pp/plextraktsync/sync.py", line 66, in sync
c_collection(movie, dry_run=dry_run)
pp/plextraktsync/sync.py", line 125, in sync_collection
nfo(f"Adding to collection: '{m.title}'")

pp/plextraktsync/media.py", line 49, in title
elf.plex.title
^^^^^^^
sr/local/lib/python3.11/functools.py", line 1001, in __get__
lf.func(instance)
^^^^^^^^^^^
pp/plextraktsync/plex/PlexLibraryItem.py", line 104, in title
type == "movie" and self.item.editionTitle:
^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/plexapi/base.py", line 503, in __getattribute__
load(_overwriteNone=False)
sr/local/lib/python3.11/site-packages/plexapi/base.py", line 377, in _reload
elf._server.query(key)
^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/plexapi/server.py", line 745, in query
= method(url, headers=headers, timeout=timeout, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 103, in get
elf.request('GET', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 159, in request
uper().request(method, url, *args, headers=headers, **kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/sessions.py", line 587, in request
elf.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 206, in send
= self._send_and_cache(request, actions, cached_response, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 230, in _send_and_cache
= super().send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/sessions.py", line 701, in send
ter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/adapters.py", line 578, in send
adTimeout(e, request=request)
.exceptions.ReadTimeout: HTTPSConnectionPool(host='192-168-1-119.5a5c4bc7cb4d4f99bb5fa1143504a22c.plex.direct', port=32400): Read timed out. (read timeout=30)
NING �[0m plextraktsync without command is deprecated. Executing �[32m"plextraktsync �[0m
c"�[0m
O �[0m PlexTraktSync [�[1;36m0.25�[0m.�[1;36m16�[0m]
O �[0m Sync Movie sections: [�[32m'Movies'�[0m]
O �[0m Sync Show sections: [�[32m'Television'�[0m]
aceback (most recent call last):
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 449, in _make_request
e_from(e, None)
tring>", line 3, in raise_from
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 444, in _make_request
response = conn.getresponse()
^^^^^^^^^^
sr/local/lib/python3.11/http/client.py", line 1374, in getresponse
.begin()
sr/local/lib/python3.11/http/client.py", line 318, in begin
status, reason = self._read_status()
^^^^^^^^^^^
sr/local/lib/python3.11/http/client.py", line 279, in _read_status
tr(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/socket.py", line 706, in readinto
elf._sock.recv_into(b)
^^^^^^^^^^^^^^^
sr/local/lib/python3.11/ssl.py", line 1278, in recv_into
elf.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/ssl.py", line 1134, in read
elf._sslobj.read(len, buffer)
^^^^^^^^^^^^^^^^^^^^^^
rror: The read operation timed out

andling of the above exception, another exception occurred:

k (most recent call last):
sr/local/lib/python3.11/site-packages/requests/adapters.py", line 489, in send
onn.urlopen(
^^^^^
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
= retries.increment(
^^^^^^^^^^
sr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
x.reraise(type(error), error, _stacktrace)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/urllib3/packages/six.py", line 770, in reraise
lue
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
response = self._make_request(
^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 451, in _make_request
ise_timeout(err=e, url=url, timeout_value=read_timeout)
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 340, in _raise_timeout
adTimeoutError(
exceptions.ReadTimeoutError: HTTPSConnectionPool(host='192-168-1-119.5a5c4bc7cb4d4f99bb5fa1143504a22c.plex.direct', port=32400): Read timed out. (read timeout=30)

andling of the above exception, another exception occurred:

k (most recent call last):
rozen runpy>", line 198, in _run_module_as_main
rozen runpy>", line 88, in _run_code
pp/plextraktsync/__main__.py", line 18, in <module>

sr/local/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
elf.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
f.invoke(ctx)
^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1635, in invoke
er().invoke(ctx)
^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
tx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
_callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pp/plextraktsync/cli.py", line 69, in cli

sr/local/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
elf.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
f.invoke(ctx)
^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
tx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
_callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
pp/plextraktsync/cli.py", line 25, in wrap
s, **kwargs)
pp/plextraktsync/commands/sync.py", line 73, in sync
ync(walker=w, dry_run=config.dry_run)
pp/plextraktsync/sync.py", line 66, in sync
c_collection(movie, dry_run=dry_run)
pp/plextraktsync/sync.py", line 125, in sync_collection
nfo(f"Adding to collection: '{m.title}'")

pp/plextraktsync/media.py", line 49, in title
elf.plex.title
^^^^^^^
sr/local/lib/python3.11/functools.py", line 1001, in __get__
lf.func(instance)
^^^^^^^^^^^
pp/plextraktsync/plex/PlexLibraryItem.py", line 104, in title
type == "movie" and self.item.editionTitle:
^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/plexapi/base.py", line 503, in __getattribute__
load(_overwriteNone=False)
sr/local/lib/python3.11/site-packages/plexapi/base.py", line 377, in _reload
elf._server.query(key)
^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/plexapi/server.py", line 745, in query
= method(url, headers=headers, timeout=timeout, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 103, in get
elf.request('GET', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 159, in request
uper().request(method, url, *args, headers=headers, **kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/sessions.py", line 587, in request
elf.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 206, in send
= self._send_and_cache(request, actions, cached_response, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 230, in _send_and_cache
= super().send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/sessions.py", line 701, in send
ter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/adapters.py", line 578, in send
adTimeout(e, request=request)
.exceptions.ReadTimeout: HTTPSConnectionPool(host='192-168-1-119.5a5c4bc7cb4d4f99bb5fa1143504a22c.plex.direct', port=32400): Read timed out. (read timeout=30)
NING �[0m plextraktsync without command is deprecated. Executing �[32m"plextraktsync �[0m
c"�[0m
O �[0m PlexTraktSync [�[1;36m0.25�[0m.�[1;36m16�[0m]
O �[0m Sync Movie sections: [�[32m'Movies'�[0m]
O �[0m Sync Show sections: [�[32m'Television'�[0m]
aceback (most recent call last):
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 449, in _make_request
e_from(e, None)
tring>", line 3, in raise_from
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 444, in _make_request
response = conn.getresponse()
^^^^^^^^^^
sr/local/lib/python3.11/http/client.py", line 1374, in getresponse
.begin()
sr/local/lib/python3.11/http/client.py", line 318, in begin
status, reason = self._read_status()
^^^^^^^^^^^
sr/local/lib/python3.11/http/client.py", line 279, in _read_status
tr(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/socket.py", line 706, in readinto
elf._sock.recv_into(b)
^^^^^^^^^^^^^^^
sr/local/lib/python3.11/ssl.py", line 1278, in recv_into
elf.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/ssl.py", line 1134, in read
elf._sslobj.read(len, buffer)
^^^^^^^^^^^^^^^^^^^^^^
rror: The read operation timed out

andling of the above exception, another exception occurred:

k (most recent call last):
sr/local/lib/python3.11/site-packages/requests/adapters.py", line 489, in send
onn.urlopen(
^^^^^
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
= retries.increment(
^^^^^^^^^^
sr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
x.reraise(type(error), error, _stacktrace)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/urllib3/packages/six.py", line 770, in reraise
lue
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
response = self._make_request(
^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 451, in _make_request
ise_timeout(err=e, url=url, timeout_value=read_timeout)
sr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 340, in _raise_timeout
adTimeoutError(
exceptions.ReadTimeoutError: HTTPSConnectionPool(host='192-168-1-119.5a5c4bc7cb4d4f99bb5fa1143504a22c.plex.direct', port=32400): Read timed out. (read timeout=30)

andling of the above exception, another exception occurred:

k (most recent call last):
rozen runpy>", line 198, in _run_module_as_main
rozen runpy>", line 88, in _run_code
pp/plextraktsync/__main__.py", line 18, in <module>

sr/local/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
elf.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
f.invoke(ctx)
^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1635, in invoke
er().invoke(ctx)
^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
tx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
_callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pp/plextraktsync/cli.py", line 69, in cli

sr/local/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
elf.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
f.invoke(ctx)
^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
tx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
_callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
pp/plextraktsync/cli.py", line 25, in wrap
s, **kwargs)
pp/plextraktsync/commands/sync.py", line 73, in sync
ync(walker=w, dry_run=config.dry_run)
pp/plextraktsync/sync.py", line 66, in sync
c_collection(movie, dry_run=dry_run)
pp/plextraktsync/sync.py", line 125, in sync_collection
nfo(f"Adding to collection: '{m.title}'")

pp/plextraktsync/media.py", line 49, in title
elf.plex.title
^^^^^^^
sr/local/lib/python3.11/functools.py", line 1001, in __get__
lf.func(instance)
^^^^^^^^^^^
pp/plextraktsync/plex/PlexLibraryItem.py", line 104, in title
type == "movie" and self.item.editionTitle:
^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/plexapi/base.py", line 503, in __getattribute__
load(_overwriteNone=False)
sr/local/lib/python3.11/site-packages/plexapi/base.py", line 377, in _reload
elf._server.query(key)
^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/plexapi/server.py", line 745, in query
= method(url, headers=headers, timeout=timeout, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 103, in get
elf.request('GET', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 159, in request
uper().request(method, url, *args, headers=headers, **kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/sessions.py", line 587, in request
elf.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 206, in send
= self._send_and_cache(request, actions, cached_response, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests_cache/session.py", line 230, in _send_and_cache
= super().send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/sessions.py", line 701, in send
ter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
sr/local/lib/python3.11/site-packages/requests/adapters.py", line 578, in send
adTimeout(e, request=request)
.exceptions.ReadTimeout: HTTPSConnectionPool(host='192-168-1-119.5a5c4bc7cb4d4f99bb5fa1143504a22c.plex.direct', port=32400): Read timed out. (read timeout=30)

Expected behavior

Sync between Trakt/Plex

Steps to reproduce the behavior

Happens any time I run it.

Inspect of problematic items

No response

Workarounds

No response

Install method

pipx

Config file contents

cache:
  path: $PTS_CACHE_DIR/trakt_cache

excluded-libraries:
  - Other Videos
  - Private
  - Wrestling
  - "Wrestling & Sports"
  - News
  - Documentary TV
  - Variety TV
  - Cartoons

config:
  dotenv_override: true

plex:
  timeout: 30

logging:
  append: true
  # Whether to show timestamps in console messages
  console_time: false
  debug: false
  filename: plextraktsync.log
  # Additional logger names to apply filtering
  filter_loggers:
#    - plexapi
#    - requests_cache.backends
#    - requests_cache.backends.base
#    - requests_cache.backends.sqlite
#    - requests_cache.policy.actions
#    - requests_cache.session
#    - trakt.core
#    - urllib3.connectionpool
  filter:
#    # Filter out all messages with level WARNING
#    - level: WARNING
#    # Filter out message with level WARNING and containing a text
#    - level: WARNING
#      message: "not found on Trakt"
#    - message: "because provider local has no external Id"
#    - message: "because provider none has no external Id"
#    - message: "Retry using search for specific Plex Episode"
#    # Filter out messages by requests_cache
#    - name: requests_cache.backends
#    - name: requests_cache.backends.base
#    - name: requests_cache.backends.sqlite
#    - name: requests_cache.policy.actions
#    - name: requests_cache.session

# settings for 'sync' command (default)
sync:
  plex_to_trakt:
    collection: true
    # Clear collected state of items not present in Plex
    clear_collected: false
    ratings: false
    watched_status: true
    # If plex_to_trakt watchlist=false and trakt_to_plex watchlist=true
    # the Plex watchlist will be overwritten by Trakt watchlist
    watchlist: false
  trakt_to_plex:
    liked_lists: false
    # If two-way rating sync, Plex rating takes precedence over Trakt rating
    ratings: false
    watched_status: true
    # If trakt_to_plex watchlist=false and plex_to_trakt watchlist=true
    # the Trakt watchlist will be overwritten by Plex watchlist
    watchlist: false
    # If you prefer to fetch trakt watchlist as a playlist instead of
    # plex watchlist, toggle this to true (is read only if watchlist=true)
    watchlist_as_playlist: false

# settings for 'watch' command
watch:
  add_collection: false
  remove_collection: false
  # what video watched percentage (0 to 100) triggers the watched status
  scrobble_threshold: 80
  # true to scrobble only what's watched by you, false for all your PMS users
  username_filter: true
  # Show the progress bar of played media in terminal
  media_progressbar: true

xbmc-providers:
  movies: imdb
  shows: tvdb

##### Advanced settings below this line, don't edit unless you know what you're doing #####
#http_cache:
  # https://requests-cache.readthedocs.io/en/main/user_guide/expiration.html#url-patterns
  # https://requests-cache.readthedocs.io/en/main/user_guide/expiration.html#expiration-values
  #
  # The value is seconds to cache.
  # Or one of the following special values:
  # - DO_NOT_CACHE: Skip both reading from and writing to the cache
  # - EXPIRE_IMMEDIATELY: Consider the response already expired, but potentially usable
  # - NEVER_EXPIRE: Store responses indefinitely
  #
  # The value can be also suffixed with a time unit:
  # - 5m, 1h, 3d
  # See full documentation at:
  # - https://github.com/wroberts/pytimeparse#pytimeparse-time-expression-parser
  #
  # NOTE: If there is more than one match, the first match will be used in the order they are defined
#  policy:
#    "*.trakt.tv/users/me": 1d
#    "*.trakt.tv/users/likes/lists": DO_NOT_CACHE

# vim:ts=2:sw=2:et

Version

not sure, latest from unpaid App Store

Python Version

3.11.2

Operating System and Version

Unraid 6.9.2

  1. don't know what is app store (unsupported)
  2. "not sure" why you don't run --version then? also why not using plextraktsync bug-report to report? it pre-fills automatically
  3. your error report is corrupted, missing first columns, missing first lines (it also prints version starting the script), unclear also what command do you run
  4. your error seems to be not able to connect to plex server. this is out of scope of this project to troubleshoot networking issues. you may try to run plex-login command to grab new url if it has changed.

closing stale issue