caronc / nzb-subliminal

Fetches subtitles for the videos it's provided. It can be easily integrated into NZBGet and SABnzbd too.
GNU General Public License v3.0
103 stars 14 forks source link

ImportError: No module named extern #70

Closed steffanjensen closed 5 years ago

steffanjensen commented 5 years ago

Tried to install subprocess32 which does not support my NAS, the script worked fine a few weeks ago.. I must have done something wrong?

Using python 2 should i try 3 ?

caronc commented 5 years ago

Unfortunately this script only supports Python v2 right now. Did you update python on your NAS by any chance? subprocess32 is a module that isn't even used by this script :thinking: ... So I'm not quite sure where you're getting this error from.

Could you provide a bit more context around this error you're getting and/or when it's happening?

sergiogomespires commented 5 years ago

Hi, i can confirm i also get this message (ImportError: No module named extern) on a brand new dietpi x86 and ubuntu 18.10 installation. I think this happens because of the latest commit. I cloned the git without the latest commit and everything works ok now.

caronc commented 5 years ago

Thanks for your response too; the only change made between this release and the last is i no longer bundle all of the packages together.

I'd still like to see the full error message to make an assessment. This StackOverflow post suggests that you may just need to install setuptools. Hence:

pip install setuptools```

The problem with the previous version of nzb-subliminal (and why you shouldn't use it) is the bundled packages it comes with are out of date and not maintained anymore. It's better to use the newest maintained ones which can be achieved through:

pip install -r requirements.txt

It's possible the solution to this problem is for me to just add setuptools to this requirements.txt file; but I'm not sure at this point. Again, it would be fantastic if you could provide more details on the full error message you're getting.

sergiogomespires commented 5 years ago

Sure, when i try to run it with: ~/nzb-subliminal/Subliminal.py -S /mnt/USB/Videos/ -a 96 -s -t -L /mnt/USB/subtitles.log

Traceback (most recent call last): File "/root/nzb-subliminal/Subliminal.py", line 416, in <module> from apprise import Apprise File "/usr/local/lib/python2.7/dist-packages/apprise/__init__.py", line 49, in <module> from .Apprise import Apprise File "/usr/local/lib/python2.7/dist-packages/apprise/Apprise.py", line 29, in <module> from markdown import markdown File "/usr/local/lib/python2.7/dist-packages/markdown/__init__.py", line 28, in <module> from pkg_resources.extern import packaging ImportError: No module named extern

i then try to install extern with: sudo pip install extern

Requirement already satisfied: extern in /usr/local/lib/python2.7/dist-packages (0.3.0) Requirement already satisfied: subprocess32>=3.2.7 in /usr/local/lib/python2.7/dist-packages (from extern) (3.5.3)

when i try to install the requirements.txt with pip install -i requirements.txt i get this:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. ERROR: You must give at least one requirement to install (see "pip help install") I then try to install the dependencies manually the only one that fails is OpenSSL with Collecting OpenSSL Could not find a version that satisfies the requirement OpenSSL (from versions: ) No matching distribution found for OpenSSL

When i try to install setuptools i get: Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (41.0.0)

I googled this error message before i found this issue opened, and that was the first thing i tried, however it doesn't fix it. Anything else i can help with?

caronc commented 5 years ago

Oops, I'll need to update the readme file. I gave you incorrect information (-r instead of -i):

pip install -r requirements.txt

pkg_resources (where this error is coming from) is definitely tied back to setuptools.

I'll get a Docker container going this weekend (hopefully) and see if I can reproduce your problem. Thanks for all the information you shared! 🙂

caronc commented 5 years ago

Good find you guys; @reliefs for first raising the issue and @sergiogomespires for actually giving me more details to work with :slightly_smiling_face:

I think i fixed the issue, you'll just need to pull out the latest branch.

sergiogomespires commented 5 years ago

Yep, it's fixed. Everything working fine now! Thanks!

caronc commented 5 years ago

Great,

I'm going to close this issue; please feel free to re-open it or create a new ticket if you have any more questions or concerns!