skyfielders / python-skyfield

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

load.timescale() error #239

Closed tmamedzadeh closed 5 years ago

tmamedzadeh commented 5 years ago

I've faced the following error:

Python 2.7.5 (default, Jul 13 2018, 13:06:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from skyfield.api import load, EarthSatellite, utc
>>> load.timescale()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/skyfield/iokit.py", line 232, in timescale
    preds = self('deltat.preds')
  File "/usr/lib/python2.7/site-packages/skyfield/iokit.py", line 142, in __call__
    expiration_date, data = parser(f)
  File "/usr/lib/python2.7/site-packages/skyfield/iokit.py", line 309, in parse_deltat_preds
    expiration_date = date(year[0] + 1, month[0], 1)
ValueError: year is out of range
>>>
brandon-rhodes commented 5 years ago

Which version of Skyfield are you using? That data file changed format a few days ago, so you might need the new version 1.10 to parse it.

tmamedzadeh commented 5 years ago

Fixed, thanks.