5

Subliminal gives this error in Ubuntu 18.04

Traceback (most recent call last):
  File "/usr/bin/subliminal", line 9, in <module>
    load_entry_point('subliminal==1.1.1', 'console_scripts', 'subliminal')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/subliminal/__init__.py", line 10, in <module>
    from .api import (ProviderPool, check_video, provider_manager, download_best_subtitles, download_subtitles,
  File "/usr/lib/python3/dist-packages/subliminal/api.py", line 13, in <module>
    from .subtitle import compute_score, get_subtitle_path
  File "/usr/lib/python3/dist-packages/subliminal/subtitle.py", line 7, in <module>
    from guessit.matchtree import MatchTree
  File "/usr/lib/python3/dist-packages/guessit/__init__.py", line 99, in <module>
    from guessit.plugins import transformers
  File "/usr/lib/python3/dist-packages/guessit/plugins/transformers.py", line 222, in <module>
    reload()
  File "/usr/lib/python3/dist-packages/guessit/plugins/transformers.py", line 220, in reload
    reload_options(all_transformers())
  File "/usr/lib/python3/dist-packages/guessit/plugins/transformers.py", line 179, in all_transformers
    return _extensions.objects()
  File "/usr/lib/python3/dist-packages/guessit/plugins/transformers.py", line 111, in objects
    return self.map(self._get_obj)
  File "/usr/lib/python3/dist-packages/stevedore/extension.py", line 261, in map
    raise NoMatches('No %s extensions found' % self.namespace)
stevedore.exception.NoMatches: No guessit.transformer extensions found

Output of apt-cache policy subliminal

  Installed: 1.1.1-2
  Candidate: 1.1.1-2
  Version table:
 *** 1.1.1-2 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status
  • 1
    Edit your question and add the output of apt-cache policy subliminal – A.B. Nov 16 '15 at 12:06
  • Nice, same problem in Wily =\ – A.B. Nov 16 '15 at 12:11
4
+500

Answer that works not only for Ubuntu 18.04, Bionic but also any release with pip installed

The problem appears to be an incompatibility between the latest python stevedore package and guessit, as reported in the Debian Bug Report Logs

The solution would be to install an appropriate version of stevedore from the PyPi Repository, in order to do that

  • Uninstall the existing packages that you've obtained from apt by using sudo apt-get purge -y python3-stevedore
  • Install the PyPi version of subliminal with the appropriate version of stevedore by using sudo pip3 install subliminal stevedore==1.19.1

Now running subliminal from the terminal will let it run as usual:

Subliminal on 18.04

3

argparse is now part of Python2 and Python3, but subliminal depends on python3-stevedore and this package contains the entry argparse in requires.txt. You can check this with:

  • Vivid

    cat /usr/lib/python3/dist-packages/stevedore-1.3.0.egg-info/requires.txt
    
  • Wily

    cat /usr/lib/python3/dist-packages/stevedore-1.5.0.egg-info/requires.txt
    

The solution is a dirty hack, remove the line:

  • Vivid

    sudo sed -i.bak '/argparse/d' /usr/lib/python3/dist-packages/stevedore-1.3.0.egg-info/requires.txt
    
  • Wily

    sudo sed -i.bak '/argparse/d' /usr/lib/python3/dist-packages/stevedore-1.5.0.egg-info/requires.txt
    

For Bionic (18.04) the above works but take into account the stevedore version is higher. It can be checked with:

ls -l /usr/lib/python3/dist-packages/

and then search for the stevedore-* folder. In my case:

sudo sed -i.bak '/argparse/d' /usr/lib/python3/dist-packages/stevedore-1.28.0.egg-info/requires.txt

  • Is there a way to make this work in 18.04? – Lincity Jul 8 '18 at 14:40
0

Simply do:

pip3 install --user subliminal stevedore==1.19.1 

after installing subliminal via apt, in order to fix stevedore version. This will override the system version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.