Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid syntax ? #334

Closed
meokey opened this issue Feb 11, 2014 · 1 comment
Closed

SyntaxError: invalid syntax ? #334

meokey opened this issue Feb 11, 2014 · 1 comment

Comments

@meokey
Copy link

meokey commented Feb 11, 2014

$ subliminal -l en -- White\ House\ Down.(2013).mkv
Traceback (most recent call last):
File "/usr/bin/subliminal", line 9, in
load_entry_point('subliminal==0.7.4', 'console_scripts', 'subliminal')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 353, in load_entry_point
manager must be an IResourceManager"""
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2302, in load_entry_point

File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2029, in load
if group is None:
File "/usr/lib/python2.6/site-packages/subliminal/init.py", line 9, in
from .api import PROVIDERS_ENTRY_POINT, list_subtitles, download_subtitles, download_best_subtitles
File "/usr/lib/python2.6/site-packages/subliminal/api.py", line 95
providers_by_name = {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(PROVIDERS_ENTRY_POINT)}
^ (this ^ is under letter r in 'for')
SyntaxError: invalid syntax

PS. there is error when installing

$ sudo pip install subliminal
Downloading/unpacking subliminal
Downloading subliminal-0.7.4.tar.gz
Running setup.py (path:/tmp/pip_build_root/subliminal/setup.py) egg_info for package subliminal
Downloading/unpacking beautifulsoup4>=4.3.2 (from subliminal)
Downloading beautifulsoup4-4.3.2.tar.gz (143kB): 143kB downloaded
Running setup.py (path:/tmp/pip_build_root/beautifulsoup4/setup.py) egg_info for package beautifulsoup4
Downloading/unpacking guessit>=0.6.2,<0.7 (from subliminal)
Downloading guessit-0.6.2.tar.gz (123kB): 123kB downloaded
Running setup.py (path:/tmp/pip_build_root/guessit/setup.py) egg_info for package guessit
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0.1 in /usr/lib/python2.6/site-packages (from subliminal)
Downloading/unpacking enzyme>=0.4.0 (from subliminal)
Downloading enzyme-0.4.1.tar.gz (47kB): 47kB downloaded
Running setup.py (path:/tmp/pip_build_root/enzyme/setup.py) egg_info for package enzyme
Downloading/unpacking html5lib>=0.99 (from subliminal)
Downloading html5lib-0.999.tar.gz (885kB): 885kB downloaded
Running setup.py (path:/tmp/pip_build_root/html5lib/setup.py) egg_info for package html5lib
Downloading/unpacking dogpile.cache>=0.5.2 (from subliminal)
Downloading dogpile.cache-0.5.3-py2.py3-none-any.whl
Downloading/unpacking babelfish>=0.4.0,<0.5 (from subliminal)
Downloading babelfish-0.4.0.tar.gz (89kB): 89kB downloaded
Running setup.py (path:/tmp/pip_build_root/babelfish/setup.py) egg_info for package babelfish
Downloading/unpacking charade>=1.0.3 (from subliminal)
Downloading charade-1.0.3.tar.gz (168kB): 168kB downloaded
Running setup.py (path:/tmp/pip_build_root/charade/setup.py) egg_info for package charade
Downloading/unpacking pysrt>=0.5.0 (from subliminal)
Downloading pysrt-1.0.0.tar.gz
Running setup.py (path:/tmp/pip_build_root/pysrt/setup.py) egg_info for package pysrt
Requirement already satisfied (use --upgrade to upgrade): six in ./six-1.5.2-py2.6.egg (from html5lib>=0.99->subliminal)
Downloading/unpacking dogpile.core>=0.4.1 (from dogpile.cache>=0.5.2->subliminal)
Downloading dogpile.core-0.4.1-py2.py3-none-any.whl
Downloading/unpacking argparse (from pysrt>=0.5.0->subliminal)
Downloading argparse-1.1.zip (151kB): 151kB downloaded
Running setup.py (path:/tmp/pip_build_root/argparse/setup.py) egg_info for package argparse
Installing collected packages: subliminal, beautifulsoup4, guessit, enzyme, html5lib, dogpile.cache, babelfish, charade, pysrt, dogpile.core, argparse
Running setup.py install for subliminal
SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/subtitle.py', 65, 41, " matches -= {'series', 'tvdb_id', 'season', 'episode', 'title'}\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/cli.py', 84, 60, '        args.languages = {babelfish.Language.fromietf(l) for l in args.languages}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/api.py', 95, 47, '    providers_by_name = {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(PROVIDERS_ENTRY_POINT)}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/tests/test_subliminal.py', 24, 37, "        languages = {Language('eng')}\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/tests/test_providers.py', 43, 37, "        languages = {Language('tur'), Language('rus'), Language('heb'), Language('ita'), Language('fra'),\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/providers/tvsubtitles.py', 59, 49, "    languages = {babelfish.Language('por', 'BR')} | {babelfish.Language(l)\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/providers/addic7ed.py', 56, 49, "    languages = {babelfish.Language('por', 'BR')} | {babelfish.Language(l)\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/providers/podnapisi.py', 70, 56, "    languages = {babelfish.Language.frompodnapisi(l) for l in babelfish.get_language_converter('podnapisi').codes}\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/providers/opensubtitles.py', 86, 60, "    languages = {babelfish.Language.fromopensubtitles(l) for l in babelfish.get_language_converter('opensubtitles').codes}\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/providers/thesubdb.py', 32, 53, "    languages = {babelfish.Language.fromalpha2(l) for l in ['en', 'es', 'fr', 'it', 'nl', 'pl', 'pt', 'ro', 'sv', 'tr']}\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/providers/bierdopje.py', 52, 42, "    languages = {babelfish.Language(l) for l in ['eng', 'nld']}\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/converters/tvsubtitles.py', 11, 39, '        self.to_tvsubtitles = {v: k for k, v in self.from_tvsubtitles}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/subliminal/converters/podnapisi.py', 17, 37, '        self.to_podnapisi = {v: k for k, v in self.from_podnapisi.items()}\n'))

Installing subliminal script to /usr/bin

Found existing installation: beautifulsoup4 4.3.1
Uninstalling beautifulsoup4:
Successfully uninstalled beautifulsoup4
Running setup.py install for beautifulsoup4
Running setup.py install for guessit
Installing guessit script to /usr/bin
Running setup.py install for enzyme
Running setup.py install for html5lib
Running setup.py install for babelfish
SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/tests.py', 106, 69, " self.assertEqual(get_language_converter('scope').codes, {'I', 'S', 'M'})\n"))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/alpha2.py', 14, 59, '    SYMBOLS = {iso_language.alpha3: iso_language.alpha2 for iso_language in LANGUAGE_MATRIX if iso_language.alpha2}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/alpha3b.py', 14, 60, '    SYMBOLS = {iso_language.alpha3: iso_language.alpha3b for iso_language in LANGUAGE_MATRIX if iso_language.alpha3b}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/type.py', 15, 57, '    SYMBOLS = {iso_language.alpha3: iso_language.type for iso_language in LANGUAGE_MATRIX}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/name.py', 14, 57, '    SYMBOLS = {iso_language.alpha3: iso_language.name for iso_language in LANGUAGE_MATRIX}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/alpha3t.py', 14, 60, '    SYMBOLS = {iso_language.alpha3: iso_language.alpha3t for iso_language in LANGUAGE_MATRIX if iso_language.alpha3t}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/scope.py', 15, 58, '    SYMBOLS = {iso_language.alpha3: iso_language.scope for iso_language in LANGUAGE_MATRIX}\n'))

SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/babelfish/converters/opensubtitles.py', 20, 90, "        self.codes = (self.alpha2_converter.codes | self.alpha3b_converter.codes | {'pob', 'pb', 'scc', 'mne'})\n"))

Running setup.py install for charade
changing mode of build/scripts-2.6/charade from 644 to 755
changing mode of /usr/bin/charade to 755
Running setup.py install for pysrt
Installing srt script to /usr/bin
Running setup.py install for argparse
Successfully installed subliminal beautifulsoup4 guessit enzyme html5lib dogpile.cache babelfish charade pysrt dogpile.core argparse
Cleaning up...

@Diaoul
Copy link
Owner

Diaoul commented Feb 11, 2014

Subliminal is not compatible with python 2.6, update to 2.7 or 3.3

@Diaoul Diaoul closed this as completed Feb 11, 2014
@caronc caronc mentioned this issue Sep 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants