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

error with some courses #20

Closed
michaeljf opened this issue Feb 9, 2013 · 1 comment
Closed

error with some courses #20

michaeljf opened this issue Feb 9, 2013 · 1 comment

Comments

@michaeljf
Copy link

Thank you for this awesome tool!

I am getting an error with just some courses. This is from a Ubuntu 12.04 LTS OS. Below is the error message:

...

  • Authenticating as site_user...
  • Already logged in
  • Collecting downloadable content from http://class.coursera.org/dataanalysis-001/lecture/index
  • Got all downloadable content for dataanalysis-001
  • dataanalysis-001 will be downloaded to /home/local_user/my/coursera/courses/dataanalysis-001
    • Downloading lecture/syllabus pages
  • Authenticating as site_user...
    Traceback (most recent call last):
    File "/usr/local/bin/coursera-dl", line 9, in
    load_entry_point('coursera-dl==1.1.11', 'console_scripts', 'coursera-dl')()
    File "/usr/local/lib/python2.7/dist-packages/courseradownloader/courseradownloader.py", line 452, in main
    d.download_course(cn,dest_dir=args.dest_dir)
    File "/usr/local/lib/python2.7/dist-packages/courseradownloader/courseradownloader.py", line 183, in download_course
    self.login(cname)
    File "/usr/local/lib/python2.7/dist-packages/courseradownloader/courseradownloader.py", line 42, in login
    page = self.browser.open(self.LOGIN_URL % course_name)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
    return self._mech_open(url, data, timeout=timeout)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_opener.py", line 204, in open
    response = meth(req, response)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 457, in http_response
    'http', request, response, code, msg, hdrs)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_opener.py", line 221, in error
    result = apply(self._call_chain, args)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(_args)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 571, in http_error_302
    return self.parent.open(new)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
    return self._mech_open(url, data, timeout=timeout)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_opener.py", line 193, in open
    response = urlopen(self, req, data)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 344, in _open
    '_open', req)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(_args)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1170, in https_open
    return self.do_open(conn_factory, req)
    File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1118, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
@dgorissen
Copy link
Owner

Mm, tested here and it works fine. Ensure you are using the last version. Did you manually accept the honour code before trying to download via the script?

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