skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.43k stars 213 forks source link

Issue connecting to navy.mil for deltat.data on 1.10 #238

Closed jonathanmthomas closed 5 years ago

jonathanmthomas commented 5 years ago

Seeing issues with loading of timescale, specifically with this deltat.data file. Is there a way to disable the use of this particular timescale?

File "/opt/conda/lib/python3.6/site-packages/skyfield/iokit.py", line 275, in timescale data = self('deltat.data') File "/opt/conda/lib/python3.6/site-packages/skyfield/iokit.py", line 185, in __call__ download(url, path, self.verbose) File "/opt/conda/lib/python3.6/site-packages/skyfield/iokit.py", line 479, in download raise IOError('cannot get {0} because {1}'.format(url, e)) OSError: cannot get http://maia.usno.navy.mil/ser7/deltat.data because Remote end closed connection without response

brandon-rhodes commented 5 years ago

That's the only official source I can find for that file, but enough folks have trouble downloading it (especially from areas of the world that the government might periodically block?) that I'm thinking of including it inside Skyfield and not trying to download an up to date copy unless the developer requests it. I'll update this issue after exploring this possibility.

jonathanmthomas commented 5 years ago

Thank you for the update. That would be great if you could include a copy with the Skyfield library. I'll keep an eye out for any new updates.

On Feb 5, 2019, at 8:24 PM, Brandon Rhodes notifications@github.com wrote:

That's the only official source I can find for that file, but enough folks have trouble downloading it (especially from areas of the world that the government might periodically block?) that I'm thinking of including it inside Skyfield and not trying to download an up to date copy unless the developer requests it. I'll update this issue after exploring this possibility.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

mountain commented 5 years ago

In China, we face connection problems.

BrendanLeber commented 5 years ago

Today in the USA I get the same error and navy.mil doesn't even resolve as a valid hostname.

ghost commented 5 years ago

I don't think navy.mil ever resolves, though it does have MX records. Try www.navy.mil instead.

I put an uptimerobot.com (not an endorsement) on http://maia.usno.navy.mil/ser7/ and it has a reasonable uptime of about 98% since I started monitoring on 22 Dec 2018.

Of course, mirroring is always a good idea (could we use google's cache or something maybe?)

The logs from uptimerobot.com (which unfortunately only go back three months or so):

Event,Monitor,Date-Time,Reason,Duration,"Duration (in mins.)","Monitor URL"
Up,maia,"2019-06-18 19:14:06",OK,"405 hrs, 15 mins",24316,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-06-18 19:13:14","Connection Timeout","0 hrs, 0 mins",1,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-06-17 16:47:04",OK,"26 hrs, 26 mins",1586,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-06-17 16:32:29","Connection Timeout","0 hrs, 14 mins",15,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-06-17 16:26:43",OK,"0 hrs, 5 mins",6,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-06-16 22:15:59","Connection Timeout","18 hrs, 10 mins",1091,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-05-22 04:27:18",OK,"617 hrs, 48 mins",37069,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-05-22 04:26:12","Connection Timeout","0 hrs, 1 mins",1,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-05-14 13:00:33",OK,"183 hrs, 25 mins",11006,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-05-14 13:00:26","Connection Timeout","0 hrs, 0 mins",0,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-05-05 03:25:32",OK,"225 hrs, 34 mins",13535,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-05-05 00:58:57","Connection Timeout","2 hrs, 26 mins",147,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-04-30 22:13:15",OK,"98 hrs, 45 mins",5926,http://maia.usno.navy.mil/ser7/
Down,maia,"2019-04-30 22:05:36","Connection Timeout","0 hrs, 7 mins",8,http://maia.usno.navy.mil/ser7/
Up,maia,"2019-03-04 13:25:32",OK,"1376 hrs, 40 mins",82600,http://maia.usno.navy.mil/ser7/
brandon-rhodes commented 5 years ago

I have just released https://pypi.org/project/skyfield/1.11/ that supports load.timescale(builtin=True) that does not try to download updated files — enjoy!