linuxserver / docker-bazarr

GNU General Public License v3.0
232 stars 29 forks source link

[BUG] No module named 'pkg_resources' from v.1.2.4-ls208 and afterwards on QNAP #120

Closed T81 closed 1 year ago

T81 commented 1 year ago

Is there an existing issue for this?

Current Behavior

App does not start due to "ModuleNotFoundError"

Expected Behavior

No response

Steps To Reproduce

Deploy container on a QNAP

Environment

- OS: QNAP
- How docker service was installed: cli

CPU architecture

x86-64

Docker creation

Using the linuxservio compose file contents

Container logs

[custom-init] No custom files found, skipping...
Bazarr starting...
Traceback (most recent call last):
  File "/app/bazarr/bin/bazarr/main.py", line 20, in <module>
    from app.check_update import apply_update, check_releases, check_if_new_update  # noqa E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/app/check_update.py", line 14, in <module>
    from .config import settings
  File "/app/bazarr/bin/bazarr/app/config.py", line 8, in <module>
    from subliminal.cache import region
  File "/app/bazarr/bin/bazarr/../libs/subliminal/__init__.py", line 12, in <module>
    from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
  File "/app/bazarr/bin/bazarr/../libs/subliminal/core.py", line 29, in <module>
    from babelfish import Language, LanguageReverseError
  File "/app/bazarr/bin/bazarr/../libs/babelfish/__init__.py", line 14, in <module>
    from .converters import (LanguageConverter, LanguageReverseConverter, LanguageEquivalenceConverter, CountryConverter,
  File "/app/bazarr/bin/bazarr/../libs/babelfish/converters/__init__.py", line 5, in <module>
    from pkg_resources import iter_entry_points, EntryPoint
ModuleNotFoundError: No module named 'pkg_resources'
Bazarr exited.
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

j0nnymoe commented 1 year ago

I suspect you're experiencing the same as portainer and Synology GUI's: https://info.linuxserver.io/issues/2023-05-22-portainer/

Roxedus commented 1 year ago

Most likely this https://info.linuxserver.io/issues/2023-05-22-portainer/

T81 commented 1 year ago

Everything else, that is, 14 containers are all working fine except when updating bazarr. I am using portainer for management. This has happened when the image rebased to Alpine, maybe this is causing the issue. It looks more than a coincidence

thespad commented 1 year ago

Bazarr has been on a version of our Alpine base image since the container was first published in 2018. The links that have already been posted clearly explain the issue; it doesn't affect all containers and is particularly an issue with Python-based applications.

It's a consequence of lazy design by the Portainer, and other, devs that silently overwrites configuration provided by the image maintainers.

T81 commented 1 year ago

I see. The rebase to Alpine claim is my fault. The last working version is v1.2.4-ls207. After this I get the import error. So using docker compose for example, will solve this issue, right?

thespad commented 1 year ago

That's our recommendation, otherwise you can completely remove it from Portainer and redeploy, rather than doing a recreate/update, which will work around the issue.

T81 commented 1 year ago

Redeploying outside portainer solved the issue

jb773 commented 6 months ago

For anyone who wants an actual solution other than unwinding their whole Portainer setup, I had some success with (1) removing/deleting everything Bazarr including the downloaded images, volumes, etc, and (2) taking out the environment variables for PATH, HOME, TERM from my docker-compose stack in Portainer. Redeployed the stack and it works fine for now.