[AstroPy] Bad time file being downloaded

Eric L. N. Jensen ejensen1 at swarthmore.edu
Tue Mar 29 15:02:45 EDT 2022


Hi Phil, 

You should be able to edit your .astropy/config/astropy.cfg file and find the iers section there to set some things, for example to set auto_download to False.   Details on the iers config parameters are here:  https://docs.astropy.org/en/stable/utils/iers.html#configuration-parameters <https://docs.astropy.org/en/stable/utils/iers.html#configuration-parameters> 

It looks like you can also edit the iers_auto_url parameter to point to a different URL if you like. 

I agree that ideally astropy should recognize if it’s not getting sensible output from a given download, so that could be a good issue to open.  But perhaps the above will help in the short term. 

Hope this helps - 

Eric
 
Eric Jensen
Professor of Astronomy
Chair, Natural Sciences & Engineering Division
Swarthmore College
 

> On Mar 29, 2022, at 12:43 PM, Evans, Phil (Dr.) <pae9 at leicester.ac.uk> wrote:
> 
> Hi Ramiro and others,
> 
> I tried reinstalling astropy but no luck. For now, I’ve got a semi-fix because it was working on another machine (which had obviously downloaded from a different site) so I copied my .astropy directory across, but this is ony short-term, and doesn’t deal with the underlying problem that astropy is downloading essentially a 404 page and so throwing an error - that there doesn’t seem to be a way to avoid.
> 
> Is there no way to set preferences or blacklist a given URL? I don’t know the intimate details of astropy, but it downloads sites.json, so I assume from this it selects where to get the IERS stuff from(?) So ideally I’d like to be able to say, “Don’t use that site.” Actually - more ideally, the back-end of astropy should realise when the file it has downloaded is not the expected file and switch to a different source — I guess maybe I should report this as a bug on the git repo?
> 
> Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20220329/464407f1/attachment.html>


More information about the AstroPy mailing list