subtitle-downloader icon indicating copy to clipboard operation
subtitle-downloader copied to clipboard

ModuleNotFoundError

Open srijeetHalder opened this issue 8 years ago • 4 comments

Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' GOTO was unexpected at this time.

Above error comes when I am using the script.

srijeetHalder avatar Apr 07 '17 06:04 srijeetHalder

same as #25. Already reported.

marauderlabs avatar Apr 07 '17 06:04 marauderlabs

Have you installed the requests package?

On 7 Apr 2017 11:52 a.m., "Anand" [email protected] wrote:

same as #25 https://github.com/manojmj92/subtitle-downloader/issues/25. Already reported.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/manojmj92/subtitle-downloader/issues/39#issuecomment-292451850, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2OwYUo4Kx2nh00XJBfKSbT4qb1JBOnks5rtdY9gaJpZM4M2f_E .

manojmj92 avatar Apr 07 '17 06:04 manojmj92

The latest version of the script is broken for packages and functionality as well.

Installed the requests, lxml, and BeautifulSoup packages. However, the script remains broken for SubDB search included! I manually searched on SubDB for many movies and found subtitles. Example, Moneyball released in 2011. The script however doesn't download from SubDB, I commented the SubScene code and put some debugs to find it's giving a 404 error.

When was this last tested to be working?

jay-ramani avatar Apr 13 '17 14:04 jay-ramani

there are few unnecessary module in this repos, like requests its only shorthand for urllib and not builtin module and we can replace with function get() like

def get(url):
     req = urllib2.Request(url)
     html = urllib2.urlopen(req).read()
     return html

second is module bs4 (BeautifulSoup) known as super slow html parser (http://blog.dispatched.ch/2010/08/16/beautifulsoup-vs-lxml-performance/) use instead lxml directly or powerful Regex so dont need to install module lxml. another problem is search results is no longer with structure a > span tags but to capture the results we can use regex re.compile('href="(/subtitles/[^"]+)"').findall(html) I'm not an expert so let wait @manojmj92 to completely rewrite this project 😃

ewwink avatar Apr 29 '17 02:04 ewwink