Flexget / Flexget

The official FlexGet repository
http://www.flexget.com
MIT License
1.73k stars 471 forks source link

CLI fails due to missing colorclass dependency (v3.1.141 regression) #3205

Closed jbeich closed 2 years ago

jbeich commented 2 years ago

Regressed by b3b93f45fc16

Expected behaviour:

Running CLI via flexget_vanilla.py (not installed) or flexget (after install) without arguments shows usage string without any errors. Other CLI commands also work without showing colorclass errors.

Actual behaviour:

Every CLI command fails due to colorclass not specified in either requirements.in or requirements.txt e.g.,

$ python3.8 flexget_vanilla.py --help
2021-10-20 18:30:01 CRITICAL plugin                        Plugin `flexget.plugins.cli.plugins` failed to import dependencies
Traceback (most recent call last):

  File "flexget_vanilla.py", line 11, in <module>
    flexget.main()
    │       └ <function main at 0x20e54100>
    └ <module 'flexget' from '/tmp/flexget/flexget/__init__.py'>

  File "/tmp/flexget/flexget/__init__.py", line 44, in main
    manager.start()
    │       └ <function Manager.start at 0x22ee4e38>
    └ <flexget.manager.Manager object at 0x22ee60e8>

  File "/tmp/flexget/flexget/manager.py", line 383, in start
    self.initialize()
    │    └ <function Manager.initialize at 0x22ee4d18>
    └ <flexget.manager.Manager object at 0x22ee60e8>

  File "/tmp/flexget/flexget/manager.py", line 223, in initialize
    plugin.load_plugins(
    │      └ <function load_plugins at 0x22a544a8>
    └ <module 'flexget.plugin' from '/tmp/flexget/flexget/plugin.py'>

  File "/tmp/flexget/flexget/plugin.py", line 550, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    │                       └ ['/home/holo/.flexget/plugins', '/tmp/flexget/flexget/plugins']
    └ <function _load_plugins_from_dirs at 0x22a543d0>

  File "/tmp/flexget/flexget/plugin.py", line 468, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    │              │            └ PosixPath('/tmp/flexget/flexget/plugins/cli/plugins.py')
    │              └ 'flexget.plugins.cli.plugins'
    └ <function _import_plugin at 0x22a54388>

> File "/tmp/flexget/flexget/plugin.py", line 419, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.plugins.cli.plugins'
    └ <function import_module at 0x20dbb418>

  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.plugins.cli.plugins'
           │          └ <function _gcd_import at 0x20c8dd60>
           └ <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/tmp/flexget/flexget/plugins/cli/plugins.py", line 1, in <module>
    from colorclass.toggles import disable_all_colors

ModuleNotFoundError: No module named 'colorclass'
[...]
usage: flexget [-V] [--test] [-c CONFIG] [--logfile LOGFILE]
               [--loglevel LEVEL] [--bugreport] [--profile [OUTFILE]] [--cron]
               [--help] [--debug-warnings] [--debug-db-sessions]
               <command> ...
[...]

Config:

None for usage string (--help). For execute and other commands I've used the following:

tasks:
  bsdnow_mp3:
    rss: https://feeds.feedburner.com/BsdNowMp3
    accept_all: yes
    limit_new: 1
    exec: fetch -qo "/tmp/{{title}}.mp3" "{{url}}"

Additional information:

gazpachoking commented 2 years ago

Oops, let those slip through. They are fixed now though. Thanks for the report!