Flexget / Flexget

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

Flexget crashes due to "No module named 'packaging'" #2641

Closed Nihim closed 4 years ago

Nihim commented 4 years ago

Expected behaviour:

daemon starts

Actual behaviour:

flexget crashes

Steps to reproduce:

flexget daemon start -d

Log:

    self.initialize()
    |    -> <function Manager.initialize at 0x7fceb0a4d950>
    -> <flexget.manager.Manager object at 0x7fceb204add8>
  File "/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/manager.py", line 215, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      |  |    |    |    -> '/home/loke/.flexget'
                      |  |    |    -> <flexget.manager.Manager object at 0x7fceb204add8>
                      |  |    -> <function join at 0x7fceb2c67ea0>
                      |  -> <module 'posixpath' from '/home/loke/.psources/flexget/lib/python3.7/posixpath.py'>
                      -> <module 'os' from '/home/loke/.psources/flexget/lib/python3.7/os.py'>
  File "/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 555, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    |                       -> ['/home/loke/.flexget/plugins', '/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/plugins']
    -> <function _load_plugins_from_dirs at 0x7fceb0f59d90>
  File "/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 473, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    |              |            -> PosixPath('/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/plugins/clients/pyload.py')
    |              -> 'flexget.plugins.clients.pyload'
    -> <function _import_plugin at 0x7fceb0f59d08>
> File "/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    |             -> 'flexget.plugins.clients.pyload'
    -> <function import_module at 0x7fceb2ba36a8>
  File "/home/loke/.psources/flexget/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           |          |           |    |        |        -> 0
           |          |           |    |        -> None
           |          |           |    -> 0
           |          |           -> 'flexget.plugins.clients.pyload'
           |          -> <function _gcd_import at 0x7fceb2ce5e18>
           -> <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/loke/.psources/flexget/lib/python3.7/site-packages/flexget/plugins/clients/pyload.py", line 11, in <module>
    from packaging import version

ModuleNotFoundError: No module named 'packaging'

Additional information:

paranoidi commented 4 years ago

Thank you for detailing which version works and which does not. This helps narrowing issue down a lot.

gazpachoking commented 4 years ago

@paranoidi New pyload pr added packaging requirement, we either just need to add it to deps or make it optional in that plugin.

paranoidi commented 4 years ago

@gazpachoking how was this not caught by ci? It should be optional dep imo.

gazpachoking commented 4 years ago

@paranoidi I'm assuming it was missed by CI because it's included by one of our dev dependencies. We should probably have at least one set of tests that runs without installing those.