-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL issues with Leap_Second.dat source #317
Comments
Thanks for letting me know! Do other Python versions work, break, or is 3.7 the only one you've been able to test so far? |
I have the same issue with Python 3.6.6 on macOS. No problems with Python 3.7.3 on Debian buster. |
EDIT: However, this question on StackOverflow : https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error Has an answer from user Craig Glennie that might point at the culprit. It suggests that Python 3.6 on macOS comes with no SSL certificates whatsoever. The fixed suggested there worked for me:
|
So a missing SSL certificate might be at issue? Interesting. Which raises many of the points brought up here: https://stackoverflow.com/questions/22027418/openssl-python-requests-error-certificate-verify-failed @rtphokie — Does the certificate install command fix the situation for you as well? If so then I'll not only add a note to the documentation, but could add a try-except to the Skyfield code so that it prints out a suggestion about running that command if it encounters the error in front of the user! |
Good day. For those of us who are new to python and are experiencing the same SSL issue retrieving this file, what directory should I download this file to? Thanks! |
@richf27 Try 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! |
Should help users in a situation like #317, where it was the leap second file that gave someone a problem, rather than the more usual ΔT culprits.
Though I am loathe to introduce yet another dependency to Skyfield, issue #317 would seem to require it unless I want to guide users through updating their system certificates themselves, or want to introduce yet more options and variations in the download routines. Alas that it incurs 308k of disk, which most users will never benefit from since their system certificates were working fine! But the simplicity of giving all users the same experience seems at this point preferable. And the extra disk space is just 1/200th of the cost of NumPy, right?
I've just released Skyfield 1.19 which, by moving to the |
I still get this error with 1.46.
|
@dearchap — Alas, Skyfield isn't directly involved in the SSL computation, so you will need to look up the error message and probably your operating system documentation to learn about why Python on your computer can't make the connection. My advice would be to download the file yourself, so that Skyfield is not involved and you can talk to the Internet directly from your script. I would start by seeing if you can download that URL in your browser, without Python at first being involved. |
Python 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.
The text was updated successfully, but these errors were encountered: