morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.88k stars 224 forks source link

Bazarr does not start after update #299

Closed pven closed 5 years ago

pven commented 5 years ago

I just got a warning telling me to restart Bazarr to apply the last update. After this, Bazarr does not start anymore. I am running at a Synology.

When I start it at the prompt, I see:

Bazarr starting...
/usr/local/lib/python2.7/site-packages/cffi/model.py:526: UserWarning: 'point_conversion_form_t' has no values explicitly defined; next version will refuse to guess which integer type it is meant to be (unsigned/signed, int/long)
  % self._get_c_name())
Traceback (most recent call last):
  File "bazarr/main.py", line 23, in <module>
    from update_db import *
  File "/volume1/@appstore/bazarr/bazarr/update_db.py", line 7, in <module>
    from scheduler import execute_now
  File "/volume1/@appstore/bazarr/bazarr/scheduler.py", line 3, in <module>
    from get_episodes import sync_episodes, update_all_episodes, update_all_movies
  File "/volume1/@appstore/bazarr/bazarr/get_episodes.py", line 11, in <module>
    from list_subtitles import list_missing_subtitles, store_subtitles, series_full_scan_subtitles, \
  File "/volume1/@appstore/bazarr/bazarr/list_subtitles.py", line 12, in <module>
    import subliminal_patch
  File "/volume1/@appstore/bazarr/bazarr/../libs/subliminal_patch/__init__.py", line 7, in <module>
    from .providers import Provider
  File "/volume1/@appstore/bazarr/bazarr/../libs/subliminal_patch/providers/__init__.py", line 8, in <module>
    from subliminal_patch.extensions import provider_registry
  File "/volume1/@appstore/bazarr/bazarr/../libs/subliminal_patch/extensions.py", line 62, in <module>
    subliminal.refiner_manager.register('drone = subliminal_patch.refiners.drone:refine')
  File "/volume1/@appstore/bazarr/bazarr/../libs/subliminal/extensions.py", line 64, in register
    ext = self._load_one_plugin(ep, False, (), {}, False)
  File "/volume1/@appstore/bazarr/bazarr/../libs/stevedore/extension.py", line 203, in _load_one_plugin
    plugin = ep.resolve()
  File "/volume1/@appstore/bazarr/bazarr/../libs/pkg_resources/__init__.py", line 2331, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/volume1/@appstore/bazarr/bazarr/../libs/subliminal_patch/refiners/drone.py", line 11, in <module>
    from subliminal_patch.core import remove_crap_from_fn
  File "/volume1/@appstore/bazarr/bazarr/../libs/subliminal_patch/core.py", line 34, in <module>
    from scandir import scandir, scandir_generic as _scandir_generic
  File "/volume1/@appstore/bazarr/bazarr/../libs/scandir.py", line 435, in <module>
    libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
  File "/usr/lib/python2.7/ctypes/util.py", line 242, in find_library
    raise RuntimeError("can not find library %s" % name)
RuntimeError: can not find library c

What can I do to get it starting?

morpheus65535 commented 5 years ago

I suppose you are running from source and not inside a docker container? Are you using some kind of package to install Bazarr?

pven commented 5 years ago

Yes, I am running from source. Docker is not working at my Synology. I downloaded it from github, and run it using Python. I had problems before, they were solved after installing Python Modules on my Synology.

morpheus65535 commented 5 years ago

You didn't specify your Python version. The issue template for bugs include questions that need to be answered to help us in debug process. This isn't optional.

pven commented 5 years ago

Sorry, here it is

Describe the bug When starting Bazarr after applying the last update, it won't start. See the log above.

Expected behavior Start ;-)

Software (please complete the following information):

Additional context Just let me know if I missed some information, and I will provide it.

morpheus65535 commented 5 years ago

Try to update python. Version 2.7.13 is minimal requirement.

pven commented 5 years ago

I have no idea yet how to update Python on my DSM. But it has my attention.

morpheus65535 commented 5 years ago

No clue either. Good luck! ;-)

pven commented 5 years ago

When I succeeded in updating I will re-open this issue, when needed. Thx!

pven commented 5 years ago

I mailed with Synology support. They are not going to update Python2, since I probably installed it by a custom package. However: they do support Python3.

Is Bazarr supported on Python3? Last time I tried it with Python3 it failed.

pven commented 5 years ago

'version 3.x not supported'

Hm, that sucks. :-) Any idea if this is on the list somewhere?

pven commented 5 years ago

In the meanwhile I traced the error to this line in libs/scandir.py

        libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
morpheus65535 commented 5 years ago

Can you try the dev branch?

pven commented 5 years ago

I just tried, I get exactly the same error.

Let me focus on the python-upgrade. However I have the feeling that somehow that won't solve the problem with the missing library.

morpheus65535 commented 5 years ago

Have you seen this post?

https://forum.synology.com/enu/viewtopic.php?t=84921

pven commented 5 years ago

Yes

I just also found out that setting a variable works !!! :-)

export PY_CTYPES_LIBPATH=/usr/lib/python2.7/ctypes

Damn, so easy. But hard to find...

Thanks for all the support on this issue!

morpheus65535 commented 5 years ago

Thanks for reporting! I hope it will help other users! :-)

pven commented 5 years ago

Just to mention: I was able to install the last update without any problems. It looks solved for good. :-)