pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.8k stars 276 forks source link

ImportError: No module named lib2to3.pgen2.parse #4087

Closed Sevyx closed 6 years ago

Sevyx commented 6 years ago

Branch/Commit: Master OS: armv5tel - python 2.7.14 What you did: First had a different error then decided to update it with the following command:

git remote set-url origin https://github.com/SickRage/SickRage.git
git fetch origin
git checkout master
git branch -u origin/master
git reset --hard origin/master
git pull

Even tried python 3.5 but didnt fix it either so switch back to python 2.7.14

What happened: Cant start up pymedusa after the update 2 days ago. Tried trouble shooting myself but gave up since my knowledge of python is limited.

What you expected: a working pymedusa

[/share/MD0_DATA/.qpkg/SickBeard-TVRage] # sh sickbeard-tvrage.sh start
armv5tel
SickBeard-TVRage prestartup checks...
 Checking for git...  Found!
Looking for /usr/bin/python2.7
Looking for /usr/local/bin/python2.7
Looking for /opt/bin/python2.7
Looking for /Apps/opt/bin/python2.7
Looking for /opt/QPython2/bin/python2.7
Found Python Version 2.7.14 at /opt/bin/python2.7
Updating SickBeard-TVRage
HEAD is now at a760263 Update translations (build 9390) [skip ci]
Already up-to-date.
Starting SickBeard-TVRage
Traceback (most recent call last):
  File "SickBeard.py", line 548, in <module>
    SickRage().start()
  File "SickBeard.py", line 250, in start
    sickbeard.initialize(consoleLogging=self.console_logging)
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/sickbeard/__init__.py", line 1316, in initialize
    if x]
ValueError: invalid literal for int() with base 10: '[]'
sharkykh commented 6 years ago

You changed your repo to SickRage. Do this: https://github.com/pymedusa/Medusa/wiki/FAQ's-and-Fixes#update-problems-try-this

Sevyx commented 6 years ago
[/share/MD0_DATA/.qpkg/SickBeard-TVRage] # sh sickbeard-tvrage.sh start
armv5tel
SickBeard-TVRage prestartup checks...
 Checking for git...  Found!
Looking for /usr/bin/python2.7
Looking for /usr/local/bin/python2.7
Looking for /opt/bin/python2.7
Looking for /Apps/opt/bin/python2.7
Looking for /opt/QPython2/bin/python2.7
Found Python Version 2.7.14 at /opt/bin/python2.7
Updating SickBeard-TVRage
HEAD is now at 77b2091 Merge pull request #4064 from pymedusa/develop
Already up-to-date.
Starting SickBeard-TVRage
Traceback (most recent call last):
  File "SickBeard.py", line 6, in <module>
    from medusa.__main__ import main
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/medusa/__main__.py", line 88, in <module>
    from medusa.server.core import AppWebServer
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/medusa/server/core.py", line 17, in <module>
    from medusa.server.api.v1.core import ApiHandler
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/medusa/server/api/v1/core.py", line 59, in <module>
    from medusa.show.coming_episodes import ComingEpisodes
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/medusa/show/coming_episodes.py", line 39, in <module>
    from past.builtins import cmp
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/ext/past/__init__.py", line 88, in <module>
    from past.translation import install_hooks as autotranslate
  File "/share/MD0_DATA/.qpkg/SickBeard-TVRage/SickBeard-TVRage/ext/past/translation/__init__.py", line 41, in <module>
    from lib2to3.pgen2.parse import ParseError
ImportError: No module named lib2to3.pgen2.parse

The error i had before i did wrong git with the sickrage.git

medariox commented 6 years ago

Related: https://github.com/PythonCharmers/python-future/issues/209

sharkykh commented 6 years ago

@medariox Why do we need past.builtins.cmp? Isn't cmp available for both Python 2 and 3?

medariox commented 6 years ago

Gone in Python 3 https://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons

simonc56 commented 6 years ago

Same happened on Libreelec distro. Python 2.7 on Libreelec is missing the lib2to3 module. So, last Medusa update can't start anymore on this system.

medariox commented 6 years ago

Fixed with: https://github.com/pymedusa/Medusa/pull/4089