Page 1 of 1

Sabnzbd 4.0.3-0ubuntu1~jcfp1~22.04 fails to start

Posted: September 25th, 2023, 5:23 pm
by makalsky
Hi all,
I had sabnzbd working for a few years now.
Today after a reboot, it failed to start.
I purged it from the system and did a clean install, but it still fails to start with the following:
pastebin .com/2K1yEEad

This boils down to sabnzbd not being able to import guessit python package.
running python3 in console and trying to do:
import guessit

results in the same error.


Sabnzbd is the only package on my system that depends on guessit.
guessit package version is 3.4.3-1

on Ubuntu 22.04

Any help, greatly appreciated.

Re: Sabnzbd 4.0.3-0ubuntu1~jcfp1~22.04 fails to start

Posted: September 26th, 2023, 12:56 am
by sander
https://pastebin.com/2K1yEEad

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2866, in get_entry_map
    ep_map = self._ep_map
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2828, in __getattr__
    raise AttributeError(attr)
AttributeError: _ep_map. Did you mean: '_dep_map'?
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 54, in <module>
    import guessit
  File "/usr/lib/python3/dist-packages/guessit/__init__.py", line 8, in <module>
    from .api import guessit, GuessItApi
  File "/usr/lib/python3/dist-packages/guessit/api.py", line 17, in <module>
    from .rules import rebulk_builder
  File "/usr/lib/python3/dist-packages/guessit/rules/__init__.py", line 11, in <module>
    from .properties.episodes import episodes
  File "/usr/lib/python3/dist-packages/guessit/rules/properties/episodes.py", line 16, in <module>
    from .title import TitleFromPosition
  File "/usr/lib/python3/dist-packages/guessit/rules/properties/title.py", line 11, in <module>
    from .language import (
  File "/usr/lib/python3/dist-packages/guessit/rules/properties/language.py", line 77, in <module>
    NON_SPECIFIC_LANGUAGES = frozenset([UNDETERMINED, MULTIPLE])
  File "/usr/lib/python3/dist-packages/babelfish/language.py", line 155, in __hash__
    return hash(str(self))
  File "/usr/lib/python3/dist-packages/babelfish/language.py", line 178, in __str__
    s = self.alpha2
  File "/usr/lib/python3/dist-packages/babelfish/language.py", line 150, in __getattr__
    return language_converters[name].convert(alpha3, country, script)
  File "/usr/lib/python3/dist-packages/babelfish/converters/__init__.py", line 243, in __getitem__
    for ep in iter_entry_points(self.entry_point):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 646, in <genexpr>
    for entry in dist.get_entry_map(group).values()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2868, in get_entry_map
    ep_map = self._ep_map = EntryPoint.parse_map(
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2549, in parse_map
    for group, lines in data:
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3205, in split_sections
    for line in yield_lines(s):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2780, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1422, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1412, in get_metadata
    value = self._get(path)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1617, in _get
    return stream.read()
OSError: [Errno 5] Input/output error

Re: Sabnzbd 4.0.3-0ubuntu1~jcfp1~22.04 fails to start

Posted: September 26th, 2023, 12:59 am
by sander
makalsky wrote: September 25th, 2023, 5:23 pm

This boils down to sabnzbd not being able to import guessit python package.
running python3 in console and trying to do:
import guessit

results in the same error.

So a problem with python3 package guessit on your Ubuntu, and not with SABnzbd itself?

I usually take the bruteforce trial-and-error approach:

Uninstall python3-guessit, make sure it's gone (so: "import guessit" results in module not found), reinstall and try again.

If still not OK:
uninstall sabnzbdplus
make sure guessit is gone
then reinstall sabnzbdplus
try again

but ... trial-and-error

I hope you did not install guessit via pip, because that would make the problem more difficult.

Re: Sabnzbd 4.0.3-0ubuntu1~jcfp1~22.04 fails to start

Posted: September 26th, 2023, 8:21 am
by makalsky
So something related to locales, system languages etc. got broken.
Upgrading to newer ubuntu release solved it, for whatever reason.

Thanks