Repository navigation
Closed
Description
Run into this in #177. I've repushed the latest commit, but it seems to be more than just a fluke and failed again. I hasn't managed to reproduce it locally.
A failing build, e.g. https://travis-ci.org/astropy/astroplan/jobs/147020338
WARNING: failed to download http://maia.usno.navy.mil/ser7/finals2000A.all, using local IERS-B: HTTP Error 403: Forbidden [astropy.utils.iers.iers]
/home/travis/miniconda/envs/test/lib/python3.5/site-packages/matplotlib/__init__.py:872: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
warnings.warn(self.msg_depr % (key, alt_key))
WARNING: Tried to get polar motions for times after IERS data is valid. Defaulting to polar motion from the 50-yr mean for those. This may affect precision at the 10s of arcsec level [astropy.coordinates.builtin_frames.utils]
WARNING: (some) times are outside of range covered by IERS table. Assuming UT1-UTC=0 for coordinate transformations. [astropy.coordinates.builtin_frames.utils]
WARNING: OldEarthOrientationDataWarning: For best precision (on the order of arcseconds), you must download an up-to-date IERS Bulletin A table. To do so, run:
>>> from astroplan import download_IERS_A
>>> download_IERS_A()
[astroplan.utils]
WARNING: failed to download http://maia.usno.navy.mil/ser7/finals2000A.all, using local IERS-B: HTTP Error 403: Forbidden [astropy.utils.iers.iers]
WARNING: OldEarthOrientationDataWarning: For best precision (on the order of arcseconds), you must download an up-to-date IERS Bulletin A table. To do so, run:
>>> from astroplan import download_IERS_A
>>> download_IERS_A()
[astroplan.utils]
/home/travis/build/astropy/astroplan/docs/faq/iers.rst:75: WARNING: Exception occurred in plotting iers-1
from /home/travis/build/astropy/astroplan/docs/faq/iers.rst:
Traceback (most recent call last):
File "/home/travis/miniconda/envs/test/lib/python3.5/site-packages/matplotlib/sphinxext/plot_directive.py", line 517, in run_code
six.exec_(code, ns)
File "<string>", line 11, in <module>
File "/home/travis/miniconda/envs/test/lib/python3.5/site-packages/astropy/utils/data.py", line 1097, in download_file
raise e
File "/home/travis/miniconda/envs/test/lib/python3.5/site-packages/astropy/utils/data.py", line 1030, in download_file
remote_url, timeout=timeout)) as remote:
File "/home/travis/miniconda/envs/test/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/home/travis/miniconda/envs/test/lib/python3.5/urllib/request.py", line 472, in open
response = meth(req, response)
File "/home/travis/miniconda/envs/test/lib/python3.5/urllib/request.py", line 582, in http_response
'http', request, response, code, msg, hdrs)
File "/home/travis/miniconda/envs/test/lib/python3.5/urllib/request.py", line 510, in error
return self._call_chain(*args)
File "/home/travis/miniconda/envs/test/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/home/travis/miniconda/envs/test/lib/python3.5/urllib/request.py", line 590, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]HTTPError: Forbidden for download_IERS_A() in sphinx builds[/-][+]HTTPError: Forbidden for download_IERS_A() [/+]bsipocz commentedon Jul 24, 2016
Actually this fails locally, too:
bsipocz commentedon Jul 24, 2016
This is upstream,
http://maia.usno.navy.mil/throws a big Forbidden 403, too.taldcroft commentedon Jul 25, 2016
Has astroplan considered using the new IERS auto-download capability in astropy 1.2? I'm not sure if it would help with this test issue (when starting from a clean cache), but in general for users it should mostly make < few day downtimes of the upstream IERS site(s) invisible by means of the automated local caching.
bsipocz commentedon Jul 25, 2016
I've changed it at one place but as I see a few others are still around. Thanks for the heads up.
bmorris3 commentedon Jul 27, 2016
@taldcroft We intended to update astroplan to require >=1.2, since we rely on the new
get_moonand and observatory database features. @bsipocz – did your PR which updated the astropy version tostableeffectively update us to require 1.2 in the tests?bsipocz commentedon Jul 27, 2016
It updated to "stable", and ci-helpers should notice and update if for some reasons older than 1.2 is installed for "stable". So I think we should be fine.
bmorris3 commentedon Jul 29, 2016
@bsipocz I had similar problems and started a discussion on this problem in astropy/astropy#5059 also.
bsipocz commentedon Jul 29, 2016
@bmorris3 - Thanks, I missed that one.
maxnoe commentedon Dec 19, 2018
This is happening again.
martinjohndyer commentedon Dec 19, 2018
Can confirm ☝️
Here's how I fixed it, for anyone else looking for the fix:
Having the
download_IERS_Afunction try the backup if the original fails seems to be the obvious solution.pllim commentedon Dec 20, 2018
Any chance you can see if astropy/astropy#8308 helps fix this over here?
EDIT: Hmm maybe not (see code snippet below). 👍 to suggestion at #192 (comment)
astroplan/astroplan/utils.py
Line 125 in 6bf2cc7
lockhart commentedon Nov 15, 2019
...
Hmmm. I'm up at Palomar Observatory at the moment and am having trouble accessing either site. But toshi is particularly problematic. Here is an excerpt of the response:
bsipocz commentedon Nov 15, 2019
Update your astropy to 3.2.3, both usno servers gone offline for the foreseeable future.
lockhart commentedon Nov 15, 2019
Thanks for the quick response! 3.1.2 was in conda but updating just now got me 3.2.3 and it works! Sorry for the noise; I'd looked for a solution but didn't stumble across fixes in the newest version.
bsipocz commentedon Nov 15, 2019
No worries, this was an unexpected situation from about a month ago.
joshwalawender commentedon Dec 3, 2019
I'm also seeing this now. I get errors using both the default server and the one specified above.
Here's what I get using the URL specified above:
I get an
HTTP Error 403: Forbiddenif I don't change the default URL.bsipocz commentedon Dec 3, 2019
the navy server is also down, try the mirror one instead of the default, that should work.
(alternatively you can give astropy v4.0.rc1 a try, there was some more reshuffling of the machinery in there).
ppmim commentedon Dec 10, 2019
The v4 IERS_A_URL works !
However, I don't undestand why IERS_A_URL_MIRROR (https) is reachable with a browser but urllib.request.urlopen fails ...
maxnoe commentedon Dec 10, 2019
@ppmim they block crawlers basically. You need to set a user agent header: https://stackoverflow.com/a/24226797/3838691
Sometimes, using
requestsworks though.