l3uddz / traktarr

Script to add new series & movies to Sonarr/Radarr based on Trakt lists.
GNU General Public License v3.0
574 stars 52 forks source link

ModuleNotFoundError: No module named 'dummy_thread' #168

Open ExDominatus opened 2 years ago

ExDominatus commented 2 years ago

Describe the bug Unable to use trakt run or trakt_authenticate commands

Installation

Running python3.9 in a venv. Installed all requirements with no error, I'm on version 1.2.5

Logs

Error while trying to authenticate with trakt_authentication

  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/cashier/__init__.py", line 11, in <module>
    from _dummy_thread import get_ident
ModuleNotFoundError: No module named '_dummy_thread'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/username/apps/traktarr/traktarr.py", line 1698, in <module>
    app()
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/username/apps/traktarr/traktarr.py", line 82, in trakt_authentication
    from media.trakt import Trakt
  File "/home/username/apps/traktarr/media/trakt.py", line 6, in <module>
    from cashier import cache
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/cashier/__init__.py", line 13, in <module>
    from dummy_thread import get_ident
ModuleNotFoundError: No module named 'dummy_thread' 

Error while trying a simple "traktarr.py run"

2022-05-01 03:48:02,692 - INFO       - Traktarr                            - run                                 - Next job at None
2022-05-01 03:48:02,692 - ERROR      - Traktarr                            - run                                 - Unhandled exception occurred while processing scheduled tasks: unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime'
Traceback (most recent call last):
  File "/home/username/apps/traktarr/traktarr.py", line 1638, in run
    time.sleep(max(schedule.idle_seconds(), 0))
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/schedule/__init__.py", line 528, in idle_seconds
    return default_scheduler.idle_seconds
  File "/home/username/apps/traktarr/venv/lib/python3.9/site-packages/schedule/__init__.py", line 152, in idle_seconds
    return (self.next_run - datetime.datetime.now()).total_seconds()
TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime'
2022-05-01 03:48:03,694 - INFO       - Traktarr                            - run                                 - Next job at None

System Information

peterhirn commented 9 months ago

_dummy_thread and dummy_threading were removed in Python 3.9, see https://bugs.python.org/issue37312

Afaict trakt_authentication is failing because of the dependency on python-cashier which tries to load the removed _dummy_thread

AN1MATEK commented 7 months ago

So @peterhirn you are saying that traktarr is basically obsolete? I am running it from a container (https://hub.docker.com/r/eafxx/traktarr) but no luck.

peterhirn commented 7 months ago

So @peterhirn you are saying that traktarr is basically obsolete? I am running it from a container (https://hub.docker.com/r/eafxx/traktarr) but no luck.

I don't know. I ended up using the native Trakt integrations, ie: https://wiki.servarr.com/sonarr/settings#lists