mit-ocw-dl icon indicating copy to clipboard operation
mit-ocw-dl copied to clipboard

urllib.error.HTTPError: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop.

Open srghma opened this issue 2 years ago • 0 comments

nixos

 ✘  ~/projects/mit-ocw-dl   master  python3 python3.x/download.py https://ocw.mit.edu/courses/14-01sc-principles-of-microeconomics-fall-2011/video-lectures/
Traceback (most recent call last):
  File "/home/srghma/projects/mit-ocw-dl/python3.x/download.py", line 56, in <module>
    f = urllib.request.urlopen(str(sys.argv[1]))
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 738, in http_error_302
    raise HTTPError(req.full_url, code,
urllib.error.HTTPError: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
redirect

srghma avatar Aug 06 '23 07:08 srghma