cpoppema / docker-flexget

An auto updating FlexGet container.
82 stars 39 forks source link

Latest FlexGet giving critical errors on loading plugins #77

Closed frosty5689 closed 4 years ago

frosty5689 commented 4 years ago
2020-10-10 13:13:11 DEBUG    plugin                        Trying to load plugins from: ['/root/.flexget/plugins', '/usr/lib/python3.7/site-packages/flexget/plugins']
2020-10-10 13:13:12 DEBUG    plugin                        Plugin `memusage` requires plugin `ext lib `guppy`` to load.
2020-10-10 13:13:12 DEBUG    stevedore._cache                 reading /root/.cache/python-entrypoints/e4de9efb4e0fe6f1758d4438507103fea1b33e89d3a2e2a4a0d4ad4e501d4808
2020-10-10 13:13:12 DEBUG    stevedore._cache                 writing to /root/.cache/python-entrypoints/e4de9efb4e0fe6f1758d4438507103fea1b33e89d3a2e2a4a0d4ad4e501d4808
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='addic7ed', value='subliminal.providers.addic7ed:Addic7edProvider', group='subliminal.providers')
2020-10-10 13:13:12 ERROR    stevedore.extension                 Could not load 'addic7ed': unexpected indent (addic7ed.py, line 234)
Traceback (most recent call last):
  File "/usr/bin/flexget", line 8, in <module>
    sys.exit(main())
    │   │    └ <function main at 0x153ec39e25f0>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/usr/lib/python3.7/site-packages/flexget/__init__.py", line 43, in main
    manager.start()
    │       └ <function Manager.start at 0x153ec18dc9e0>
    └ <flexget.manager.Manager object at 0x153ec3116350>
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 371, in start
    self.initialize()
    │    └ <function Manager.initialize at 0x153ec18e4560>
    └ <flexget.manager.Manager object at 0x153ec3116350>
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 213, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      │  │    │    │    └ '/root/.flexget'
                      │  │    │    └ <flexget.manager.Manager object at 0x153ec3116350>
                      │  │    └ <function join at 0x153ec3aac170>
                      │  └ <module 'posixpath' from '/usr/lib/python3.7/posixpath.py'>
                      └ <module 'os' from '/usr/lib/python3.7/os.py'>
  File "/usr/lib/python3.7/site-packages/flexget/plugin.py", line 555, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    │                       └ ['/root/.flexget/plugins', '/usr/lib/python3.7/site-packages/flexget/plugins']
    └ <function _load_plugins_from_dirs at 0x153ec1e5a320>
  File "/usr/lib/python3.7/site-packages/flexget/plugin.py", line 473, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    │              │            └ PosixPath('/usr/lib/python3.7/site-packages/flexget/plugins/output/subtitles_subliminal.py')
    │              └ 'flexget.plugins.output.subtitles_subliminal'
    └ <function _import_plugin at 0x153ec1e52710>
  File "/usr/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.plugins.output.subtitles_subliminal'
    └ <function import_module at 0x153ec3a64cb0>
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.plugins.output.subtitles_subliminal'
           │          └ <function _gcd_import at 0x153ec3b7eb00>
           └ <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 "/usr/lib/python3.7/site-packages/flexget/plugins/output/subtitles_subliminal.py", line 15, in <module>
    from subliminal.extensions import provider_manager
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  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 "/usr/lib/python3.7/site-packages/subliminal/__init__.py", line 11, in <module>
    from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
  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 "/usr/lib/python3.7/site-packages/subliminal/core.py", line 16, in <module>
    from .extensions import provider_manager, default_providers, refiner_manager
  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 "/usr/lib/python3.7/site-packages/subliminal/extensions.py", line 99, in <module>
    'tvsubtitles = subliminal.providers.tvsubtitles:TVsubtitlesProvider'
  File "/usr/lib/python3.7/site-packages/subliminal/extensions.py", line 30, in __init__
    super(RegistrableExtensionManager, self).__init__(namespace, **kwargs)
          │                            │              │            └ {}
          │                            │              └ 'subliminal.providers'
          │                            └ <subliminal.extensions.RegistrableExtensionManager object at 0x153ec23c3e50>
          └ <class 'subliminal.extensions.RegistrableExtensionManager'>
  File "/usr/lib/python3.7/site-packages/stevedore/extension.py", line 136, in __init__
    verify_requirements)
    └ False
> File "/usr/lib/python3.7/site-packages/stevedore/extension.py", line 225, in _load_plugins
    verify_requirements,
    └ False
  File "/usr/lib/python3.7/site-packages/stevedore/extension.py", line 255, in _load_one_plugin
    plugin = ep.load()
             │  └ <function EntryPoint.load at 0x153ec23ad3b0>
             └ EntryPoint(name='addic7ed', value='subliminal.providers.addic7ed:Addic7edProvider', group='subliminal.providers')
  File "/usr/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 105, in load
    module = import_module(match.group('module'))
             │             │     └ <method 'group' of 're.Match' objects>
             │             └ <re.Match object; span=(0, 46), match='subliminal.providers.addic7ed:Addic7edProvider'>
             └ <function import_module at 0x153ec3a64cb0>
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'subliminal.providers.addic7ed'
           │          └ <function _gcd_import at 0x153ec3b7eb00>
           └ <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 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.7/site-packages/subliminal/providers/addic7ed.py", line 234
    r = self.session.get(self.server_url + 'show/%d' % show_id, params={'season': season}, timeout=10)
    ^

IndentationError: unexpected indent
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='argenteam', value='subliminal.providers.argenteam:ArgenteamProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='legendastv', value='subliminal.providers.legendastv:LegendasTVProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='opensubtitles', value='subliminal.providers.opensubtitles:OpenSubtitlesProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='podnapisi', value='subliminal.providers.podnapisi:PodnapisiProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='shooter', value='subliminal.providers.shooter:ShooterProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='thesubdb', value='subliminal.providers.thesubdb:TheSubDBProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='tvsubtitles', value='subliminal.providers.tvsubtitles:TVsubtitlesProvider', group='subliminal.providers')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint.parse('opensubtitlesvip = subliminal.providers.opensubtitles:OpenSubtitlesVipProvider')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='hash', value='subliminal.refiners.hash:refine', group='subliminal.refiners')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='metadata', value='subliminal.refiners.metadata:refine', group='subliminal.refiners')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='omdb', value='subliminal.refiners.omdb:refine', group='subliminal.refiners')
2020-10-10 13:13:12 DEBUG    stevedore.extension                 found extension EntryPoint(name='tvdb', value='subliminal.refiners.tvdb:refine', group='subliminal.refiners')
2020-10-10 13:13:13 DEBUG    plugin                        Trying to load components from: ['/root/.flexget/components', '/usr/lib/python3.7/site-packages/flexget/components']
2020-10-10 13:13:13 CRITICAL plugin                        Exception while loading plugin flexget.components.notify.notifiers.telegram
Traceback (most recent call last):
  File "/usr/bin/flexget", line 8, in <module>
    sys.exit(main())
    │   │    └ <function main at 0x153ec39e25f0>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/usr/lib/python3.7/site-packages/flexget/__init__.py", line 43, in main
    manager.start()
    │       └ <function Manager.start at 0x153ec18dc9e0>
    └ <flexget.manager.Manager object at 0x153ec3116350>
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 371, in start
    self.initialize()
    │    └ <function Manager.initialize at 0x153ec18e4560>
    └ <flexget.manager.Manager object at 0x153ec3116350>
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 213, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      │  │    │    │    └ '/root/.flexget'
                      │  │    │    └ <flexget.manager.Manager object at 0x153ec3116350>
                      │  │    └ <function join at 0x153ec3aac170>
                      │  └ <module 'posixpath' from '/usr/lib/python3.7/posixpath.py'>
                      └ <module 'os' from '/usr/lib/python3.7/os.py'>
  File "/usr/lib/python3.7/site-packages/flexget/plugin.py", line 556, in load_plugins
    _load_components_from_dirs(extra_components)
    │                          └ ['/root/.flexget/components', '/usr/lib/python3.7/site-packages/flexget/components']
    └ <function _load_components_from_dirs at 0x153ec1e5a440>
  File "/usr/lib/python3.7/site-packages/flexget/plugin.py", line 495, in _load_components_from_dirs
    _import_plugin(package_name, component_path)
    │              │             └ PosixPath('/usr/lib/python3.7/site-packages/flexget/components/notify/notifiers/telegram.py')
    │              └ 'flexget.components.notify.notifiers.telegram'
    └ <function _import_plugin at 0x153ec1e52710>
> File "/usr/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.components.notify.notifiers.telegram'
    └ <function import_module at 0x153ec3a64cb0>
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.components.notify.notifiers.telegram'
           │          └ <function _gcd_import at 0x153ec3b7eb00>
           └ <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 "/usr/lib/python3.7/site-packages/flexget/components/notify/notifiers/telegram.py", line 12, in <module>
    import telegram
  File "/usr/lib/python3.7/site-packages/telegram/__init__.py", line 23, in <module>
    from .user import User
  File "/usr/lib/python3.7/site-packages/telegram/user.py", line 23, in <module>
    from telegram.utils.helpers import mention_html as util_mention_html
  File "/usr/lib/python3.7/site-packages/telegram/utils/helpers.py", line 93, in <module>
    reference_timestamp: float = None, tzinfo: pytz.BaseTzInfo = None) -> float:
                                               └ <module 'pytz' from '/usr/lib/python3.7/site-packages/pytz/__init__.py'>

AttributeError: module 'pytz' has no attribute 'BaseTzInfo'

I don't have Telegram or Subliminal in my config, but I guess its included as default plugins so it tries to load them anyway.

frosty5689 commented 4 years ago

I'm able to get it working again by removing

python-telegram-bot and subliminal from the requirements.txt and mounting it.

cpoppema commented 4 years ago

Hello @frosty5689.

I don't have Telegram or Subliminal in my config, but I guess its included as default plugins so it tries to load them anyway.

You are correct. I accepted a pull request to keep python-telegram-bot at an older version for now and I've already opened an issue on subliminal's issue tracker here. I understand it is noisy, but I believe the error is only for logging purposes and the plugin keeps working fine otherwise.

frosty5689 commented 4 years ago

Okay. I'll keep running it without these dependencies until I actually need to publish to Telegram or something. Should keep it much stabler as I have a cronjob to automatically restart FlexGet if there is a new version on pip

arifkin88 commented 4 years ago

I'm having the same issue, but it's preventing FlexGet from starting up. @cpoppema any chance you can remove these from the requirements? I haven't had luck trying to do it myself

cpoppema commented 4 years ago

@arifkin88 I'm sorry to hear you still experience issues. Have you been able to pull the latest image & recreate your container ? I've pushed new images after accepting the pull request to pin one the package that prevents flexget from starting, but it took a while since I'm building it cross-platform.

You can always find the latest hashes here: https://hub.docker.com/repository/registry-1.docker.io/cpoppema/docker-flexget/tags?page=1, which now are: 4505d5e4b2ff linux/amd64 9cf5a288c475 linux/arm 29d263850c9e linux/arm64

You can compare these with the one in your system:

$ docker images cpoppema/docker-flexget:latest
REPOSITORY                TAG                 IMAGE ID
cpoppema/docker-flexget   latest              <your local hash here>

If it doesn't match any, run docker pull cpoppema/docker-flexget and recreate your container. I hope this helps.

arifkin88 commented 4 years ago

Thanks @cpoppema ! Looks like that did the trick. My docker-compose was pointed to cpoppema/docker-flexget:latest so I thought it would be getting latest when restarted, but looks like it wasn't and I had to do manually.