conda install version 0.4.4 gives leap second RuntimeError
If I update the gpstime module to version 0.4.4, I get the following error.
It worked using an older version, not sure which one exactly, I think 0.3.3.
I am using Mac Sierra 10.12.6
In [1]: import gpstime
/anaconda3/envs/3gfn-paper-env/lib/python3.7/site-packages/gpstime/leaps.py:110: RuntimeWarning: Leap second data is expired.
warnings.warn("Leap second data is expired.", RuntimeWarning)
In [2]: gpstime.__version__
Out[2]: '0.4.4'
In [3]: gpstime.gpsnow()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-3-40079e0c162c> in <module>
----> 1 gpstime.gpsnow()
/anaconda3/envs/3gfn-paper-env/lib/python3.7/site-packages/gpstime/__init__.py in gpsnow()
219
220 """
--> 221 return gpstime.utcnow().replace(tzinfo=tzutc()).gps()
222
223
/anaconda3/envs/3gfn-paper-env/lib/python3.7/site-packages/gpstime/__init__.py in gps(self)
191 def gps(self):
192 """Return GPS time as a float."""
--> 193 return unix2gps(self.timestamp())
194
195 def iso(self):
/anaconda3/envs/3gfn-paper-env/lib/python3.7/site-packages/gpstime/__init__.py in unix2gps(unix)
44 unix = float(unix)
45 gps = unix - GPS0
---> 46 for leap in LEAPDATA:
47 if leap < GPS0:
48 continue
/anaconda3/envs/3gfn-paper-env/lib/python3.7/site-packages/gpstime/leaps.py in __iter__(self)
125 def __iter__(self):
126 if not self.data:
--> 127 raise RuntimeError("Failed to load leap second data.")
128 for leap in self.data:
129 yield leap
RuntimeError: Failed to load leap second data.
Edited by Craig Cahillane