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

Rewrap 404 errors from pypi.org #87

Closed
peterbe opened this issue Oct 25, 2018 · 1 comment
Closed

Rewrap 404 errors from pypi.org #87

peterbe opened this issue Oct 25, 2018 · 1 comment
Assignees

Comments

@peterbe
Copy link
Owner

peterbe commented Oct 25, 2018

E.g.:

▶ python hashin.py -r /tmp/r.txt requests djangu
Traceback (most recent call last):
  File "hashin.py", line 544, in <module>
    sys.exit(main())
  File "hashin.py", line 536, in main
    dry_run=args.dry_run,
  File "hashin.py", line 142, in run
    run_single_package(spec, requirements_file, *args, **kwargs)
  File "hashin.py", line 173, in run_single_package
    include_prereleases=include_prereleases,
  File "hashin.py", line 467, in get_package_hashes
    data = get_package_data(package, verbose)
  File "hashin.py", line 400, in get_package_data
    content = json.loads(_download(url))
  File "hashin.py", line 107, in _download
    r = urlopen(url)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 564, in error
    result = self._call_chain(*args)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 756, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

In this case, you don't know which of the packages that failed on you. Was it requests or djangu?

@peterbe peterbe self-assigned this Oct 26, 2018
@peterbe
Copy link
Owner Author

peterbe commented Oct 26, 2018

Actually, this error only happens with Python 3.

peterbe added a commit that referenced this issue Oct 26, 2018
peterbe pushed a commit that referenced this issue Oct 26, 2018
* Rewrap 404 errors from pypi.org

Fixes #87

* changelog

* cleanup
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

1 participant