astropy: Error downloading IERS A file
Description
Downloading the IERS A file fails with an HTTP error, even on the new 3.2.3 version.
Steps to Reproduce
python -c "import astropy; print(astropy.__version__); from astropy.utils.data import download_file; from astropy.utils.iers import IERS_A_URL; print(IERS_A_URL); download_file(IERS_A_URL, cache=True)"
3.2.3
https://datacenter.iers.org/data/9/finals2000A.all
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/paulr/Library/Python/3.6/lib/python/site-packages/astropy/utils/data.py", line 1105, in download_file
raise e
File "/Users/paulr/Library/Python/3.6/lib/python/site-packages/astropy/utils/data.py", line 1024, in download_file
with urllib.request.urlopen(remote_url, timeout=timeout) as remote:
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/opt/local/Library/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 403: Forbidden
System Details
mcxr2 : 25>python
Python 3.6.9 (default, Sep 7 2019, 20:24:16)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform; print(platform.platform())
Darwin-15.6.0-x86_64-i386-64bit
>>> import sys; print("Python", sys.version)
Python 3.6.9 (default, Sep 7 2019, 20:24:16)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
>>> import numpy; print("Numpy", numpy.__version__)
Numpy 1.17.2
>>> import scipy; print("Scipy", scipy.__version__)
Scipy 1.3.1
>>> import astropy; print("astropy", astropy.__version__)
astropy 3.2.3
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (12 by maintainers)
I can confirm that I’m seeing this behaviour too. By contrast the code below works just fine…
as does
I thought the issue we were seeing with IERS-B was the same as that reported here for IERS-A, but it turned out to be different. We updated to astropy 3.2.3 and are not seeing the IERS-B issue anymore so the fix in #9427 was adequate.
@pllim - right, but it’s possible @dr-rodriguez is facing a different issue, since it’s IERS B, which potentailly was fixed in #9427 . I was just pointing out that this should be made a separate issue if it’s distinct from this one.
This is still a problem though, as I can also reproduce this. If everyone sees this behavior, then we basically won’t have a mirror.
Indeed the mirror works fine!