Skip to content
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

Cannot connect to hitran #8

Open
robbertbloem opened this issue May 28, 2019 · 5 comments · May be fixed by #41
Open

Cannot connect to hitran #8

robbertbloem opened this issue May 28, 2019 · 5 comments · May be fixed by #41

Comments

@robbertbloem
Copy link

I have a problem connecting to the hitran database using the api. I use the following code:

import hapi
hapi.db_begin('data')
hapi.fetch('H2O',1,1,3400,4100)

and get a "SSLCertVerificationError". I attached the full trace as a file. log.txt I found this discussion online: https://bugs.python.org/issue36866 It may be related?

I use MacOS 10.14.5, Python 3.7.3, hitran-api 1.1.0.9.6 (and also with version 1.1.0.9.0).

@robbertbloem
Copy link
Author

I checked on a Windows 10 Enterprise x64 machine and it does work correctly. I am using Python 3.7.3 and hitran-api 1.1.0.9.0.
On my Mac urllib2 is installed, but urllib3 is not. On the Windows computer urllib3 is installed, but urllib2 is not.

@MrAnimaniac
Copy link

MrAnimaniac commented Oct 13, 2022

I assume I have the same error using Windows 11. Tried Python 3.9.7 and 3.10.8 with miniconda, anaconda and without conda always after fresh install - always the same issue.

It works however fine on my windows 10 machine.

Any idea on how to solve it?

hapi_connect_error.txt

Update: it somehow sorted itself out. I used my mobile phone as a hotspot and was able to get a connection to hitran. Now it is also working with my normal WLAN. Furthermore, I installed jupyterlab git. Doing this may have updated or installed ca-certificates, if I'm not mistaken. However, I wasn't really paying attention. Perhaps it may help someone else with the same issue...

@sam88-student
Copy link

I have the same issue .. any one know how to solve this ?

@erwanp
Copy link

erwanp commented Mar 28, 2023

Still there?

@longmathemagician longmathemagician linked a pull request Jun 13, 2023 that will close this issue
@marina8888
Copy link

marina8888 commented Jun 11, 2024

Hello, I am still having this issue even with certifi installed.

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain

(_ssl.c:1122)>

Adding the following code:
ssl._create_default_https_context = ssl._create_unverified_context
urllib.request.urlopen("https://hitran.org/")"

Causes the following issue even after deleting the download files. Happy to hear any advice or if anyone was able to solve.

raise OSError(

OSError: Problem opening : None. See above. You may want to delete the download files.
"""

The above exception was the direct cause of the following exception:
OSError: Problem opening : None. See above. You may want to delete the downloaded file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants