[AstroPy] Bad time file being downloaded

Evans, Phil (Dr.) pae9 at leicester.ac.uk
Tue Mar 29 12:43:36 EDT 2022


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

On 29 Mar 2022, at 17:18, Miro Saide <mirosaide at gmail.com<mailto:mirosaide at gmail.com>> wrote:

Hi Phil,

I had a similar error but running something different,

I uninstalled Astropy and reinstalled it using: pip3 install astropy[all], I am running it on ubuntu 20.04.4 LTS...

And Finally, it worked.

Ramiro Caisse Saide
MPhil Research Student
Department of Physics
University of Mauritius
Contact Number: +258 845672884
Email: ramiro.saide at umail.uom.mu<mailto:ramiro.saide at umail.uom.mu>



Phil Evans <pae9 at leicester.ac.uk<mailto:pae9 at leicester.ac.uk>> escreveu no dia terça, 29/03/2022 à(s) 10:51:
Hi everyone

A whole bunch of my codes have suddenly started failing, on astropy.time.light_travel_time

After much debugging I've found the issue: the code downloads a URL:  ftp://anonymous:mail%40astropy.org@gdc.cddis.eosdis.nasa.gov/pub/products/iers/finals2000A.all<https://eur03.safelinks.protection.outlook.com/?url=ftp%3A%2F%2Fanonymous%3Amail%2540astropy.org%40gdc.cddis.eosdis.nasa.gov%2Fpub%2Fproducts%2Fiers%2Ffinals2000A.all&data=04%7C01%7Cpae9%40leicester.ac.uk%7C2c668a210d8d4ecaa54508da119fc4e2%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637841675176908418%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KOhw7fB5%2BpLJU%2FreeajsgDheGVR7XJ%2FlgbGgDswsSg4%3D&reserved=0> and presumably expects to find leap seconds or something. Instead it gets HTML saying "This site is currently unavailable".

Ultimately, I get the error:

ValueError: Column year failed to convert: invalid literal for int() with base 10: '<!'

Obviously from the <!DOCTYPE in the HTML page.

This is causing me major headaches, as I have some pretty critical scripts affected. Is there an easy solution, eg. for me to blacklist the above URL or something?

Thanks

Phil


--
-------------------------

Phil Evans,
Swift Development Scientist & Athena W-ISC Technical Lead
X-ray and Observational Astronomy Group,
University of Leicester

Tel: +44 (0)116 252 5059
Mobile: +44 (0)7780 980240 (work)
Mobile: +44 (0)7974 977723 (personal)

pae9 at leicester.ac.uk<mailto:pae9 at leicester.ac.uk>

http://www.star.le.ac.uk/~pae9<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.star.le.ac.uk%2F~pae9&data=04%7C01%7Cpae9%40leicester.ac.uk%7C2c668a210d8d4ecaa54508da119fc4e2%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637841675176908418%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tx2xAFLT7VJuCwzQdV7jnmmwQZwTcTdsxI9kt8Z%2FrO4%3D&reserved=0>
http://www.swift.ac.uk<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.swift.ac.uk%2F&data=04%7C01%7Cpae9%40leicester.ac.uk%7C2c668a210d8d4ecaa54508da119fc4e2%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637841675176908418%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=qq%2FiQBz5sgBvBfDKcVLk4NDWiW06WYdb4SS4ZQqSpoo%3D&reserved=0>

Follow me as a Swift scientist on Twitter: @swift_phil
http://www.star.le.ac.uk/~pae9/twitter<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.star.le.ac.uk%2F~pae9%2Ftwitter&data=04%7C01%7Cpae9%40leicester.ac.uk%7C2c668a210d8d4ecaa54508da119fc4e2%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637841675177064643%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=P48i3FiVy%2FkBAnfJ1A8hyRtK2Mx2xjIxDN3A%2BAK683I%3D&reserved=0>

_______________________________________________
AstroPy mailing list
AstroPy at python.org<mailto:AstroPy at python.org>
https://mail.python.org/mailman/listinfo/astropy<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fastropy&data=04%7C01%7Cpae9%40leicester.ac.uk%7C2c668a210d8d4ecaa54508da119fc4e2%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637841675177064643%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QmDqK%2Bx8Y%2FC9NdOT1W5wlWCC8RQOn3MPT2nCiOetS7w%3D&reserved=0>
_______________________________________________
AstroPy mailing list
AstroPy at python.org<mailto:AstroPy at python.org>
https://mail.python.org/mailman/listinfo/astropy

-------------------------

Phil Evans,
Swift Development Scientist & Athena W-ISC Technical Lead
X-ray and Observational Astronomy Group,
University of Leicester

Tel: +44 (0)116 252 5059
Mobile: +44 (0)7780 980240 (work)
Mobile: +44 (0)7974 977723 (personal)

Office: G49 Physics Building

pae9 at leicester.ac.uk<mailto:pae9 at leicester.ac.uk>

http://www.star.le.ac.uk/~pae9
http://www.swift.ac.uk

Follow me as a Swift scientist on Twitter: @swift_phil
http://www.star.le.ac.uk/~pae9/twitter

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


More information about the AstroPy mailing list