dgorissen / coursera-dl

A script for downloading course material (video's, pdfs, quizzes, etc) from coursera.org
http://dirkgorissen.com/2012/09/07/coursera-dl-a-coursera-download-script/
GNU General Public License v3.0
1.73k stars 299 forks source link

TypeError: __init__() got an unexpected keyword argument 'strict' #133

Closed hukaidong closed 10 years ago

hukaidong commented 10 years ago

win7 64x device with these questions:

Traceback (most recent call last): File "D:\绿色软件\python\coursera-master\coursera-dl", line 4, in from coursera import coursera_dl File "D:\绿色软件\python\coursera-master\coursera\coursera_dl.py", line 71, in

from cookies import ( ImportError: No module named 'cookies' D:\绿色软件\python\coursera-master>coursera-dl -u dongforregister+cour@gmail.com -p 1575689210 "sciwrite-2012-001" Downloading class: sciwrite-2012-001 Starting new HTTPS connection (1): class.coursera.org Traceback (most recent call last): File "D:\绿色软件\python\coursera-master\coursera-dl", line 6, in coursera_dl.main() File "D:\绿色软件\python\coursera-master\coursera\coursera_dl.py", line 769, i n main if download_class(args, class_name): File "D:\绿色软件\python\coursera-master\coursera\coursera_dl.py", line 716, i n download_class username=args.username, password=args.password File "D:\绿色软件\python\coursera-master\coursera\cookies.py", line 318, in ge t_cookies_for_class get_authentication_cookies(session, class_name, username, password) File "D:\绿色软件\python\coursera-master\coursera\cookies.py", line 155, in ge t_authentication_cookies login(session, class_name, username, password) File "D:\绿色软件\python\coursera-master\coursera\cookies.py", line 80, in log in r = requests.get(class_url, allow_redirects=False) File "C:\Python34\lib\site-packages\requests\api.py", line 55, in get return request('get', url, *_kwargs) File "C:\Python34\lib\site-packages\requests\api.py", line 44, in request return session.request(method=method, url=url, *_kwargs) File "C:\Python34\lib\site-packages\requests\sessions.py", line 335, in reques t resp = self.send(prep, *_send_kwargs) File "C:\Python34\lib\site-packages\requests\sessions.py", line 438, in send r = adapter.send(request, *_kwargs) File "C:\Python34\lib\site-packages\requests\adapters.py", line 292, in send timeout=timeout File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.p y", line 423, in urlopen conn = self._get_conn(timeout=pool_timeout) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.p y", line 238, in _get_conn return conn or self._new_conn() File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.p y", line 562, in _new_conn strict=self.strict) TypeError: __init__() got an unexpected keyword argument 'strict' What should I do?
dgorissen commented 10 years ago

Not ran into that one before. Are you sure you installed all dependencies correctly and have ssl support enabled (e.g., http://stackoverflow.com/questions/6643052/importerror-no-module-named-http-cookies-error-when-installing-cherrypy-3-2)

hukaidong commented 10 years ago

I tried these code " from httplib import HTTPSConnection; import ssl" and python throws me "ImportError: No module named 'httplib'"

So I think it should be the ssl problem. But I'm not sure how to enable SSL support for python 3.4.1. I've been google for that, but there are only some solution about python 2.7. I'm still trying to solve that. I'm sorry for my poor English ...

dgorissen commented 10 years ago

May be a python 3.4 issue. Check that it works with 2.7 first On 9 Jun 2014 15:30, "ccdd9451" notifications@github.com wrote:

I tried these code " from httplib import HTTPSConnection; import ssl" and python throws me "ImportError: No module named 'httplib'"

So I think it should be the ssl problem. But I'm not sure how to enable SSL support for python 3.4.1. I've been google for that, but there are only some solution about python 2.7. I'm still trying to solve that. I'm sorry for my poor English ...

— Reply to this email directly or view it on GitHub https://github.com/dgorissen/coursera-dl/issues/133#issuecomment-45496515 .

hukaidong commented 10 years ago

Ok, thanks.