Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

netCDF requirements leading to ssl error on download of netcdf file #230

Closed
knl88 opened this issue Feb 15, 2023 · 4 comments
Closed

netCDF requirements leading to ssl error on download of netcdf file #230

knl88 opened this issue Feb 15, 2023 · 4 comments
Assignees

Comments

@knl88
Copy link

knl88 commented Feb 15, 2023

Hi,

I tried to open a dataset on a thredds server with nc2mmd, for example running

nc2mmd -i https://thredds.met.no/thredds/dodsC/met.no/observations/stations/SN99935.nc -o .

but encountered an error
Error:curl error: Problem with the SSL CA cert (path? access rights?)

Think this is related to the requirements of the library netCDF in the file requirements.txt, at least when I fix the requirement to netCDF4==1.5.8, the command works for me. Also the tests in this repos, except tests/test_check_nc.py::test_failing_ncfile passes.

@johtoblan johtoblan self-assigned this Feb 15, 2023
@mortenwh
Copy link
Collaborator

This is a bit strange, as all tests are passing in github actions. Can you give more details? Also, I advice you to run nc2mmd directly on the file, and not via opendap, as mentioned in another issue.

@knl88
Copy link
Author

knl88 commented Feb 23, 2023

I get the error when running nc2mmd with netCDF4==1.6.0, the previous release works. Haven't looked too much into the details, but could be related to Unidata/netcdf4-python#1199 and Unidata/netcdf4-python#1179.

Guess the tests patches the download.

Yeap can download instead.

@magnarem
Copy link
Contributor

We have had similar issue. Netcdf/Curl cannot validate ca certs.

a possible solution is to create a file in your home directory called .ncrc and add this line:
HTTP.SSL.CAINFO=/etc/ssl/certs/ca-certificates.crt

@johtoblan
Copy link
Collaborator

Closed by adding solution to Readme, will later be fixed by using newer versions of NetCDF, which have this fixed as of june 2023

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

No branches or pull requests

4 participants