SSL issues with Leap_Second.dat source
See original GitHub issuePython Version: 3.7.3 OS: Mac OS Catalina version 10.15.2 SkyField version: 1.16
The automation which which attempts to fetch leap second information from the International Earth rotation and Reference Systems Service is running into certificate problems. Note this only happens when the Leap_Second.dat file is not cached locally.
OSError: cannot get https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat because <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
The problem is not with the Paris Observatory website but in Python 3.7 specifically with how urlib2.urlopen() accesses some https sites. For what it is worth, requests.get() fetches this URL (https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat) without any problem.
A workaround is to manually fetch the file and save it locally.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@richf27 Try
load.timescale(builtin=True)
, if you aren’t worried about leap-second-level accuracy in the future — would that get your script working again?Also: you simply download files to the current directly unless you’ve created a loader that uses some other directly. Where in the docs could I make that clearer so that users know where to put the file? Can you point me at which docs you were following when you ran into the problem? Thanks!
I have the same issue with Python 3.6.6 on macOS.
No problems with Python 3.7.3 on Debian buster.