-
Notifications
You must be signed in to change notification settings - Fork 264
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
Failure to load OPeNDAP in Colab #1179
Comments
Additional information: When using |
Update: I think the wheel being supplied via PyPI is broken. After compiling
You may want to consider rebuilding your wheels (for For reference: CSHS-CWRA/RavenPy@5bab92e |
What specifically do you think needs to be done differently when building the manylinux wheels? |
BTW, the screenshots in #1179 (comment) make it hard to read about the real issue. It seems that the problem is with curl and some SSL certificates. I get this when I try it locally:
@jswhit what version/build of curl are you using in the wheel? |
curl i s 7.75.0, openssl is 1.0.2u |
It may be a version problem or something with the wheel build. I guess the only way to figure this out is to add an OPeNDAP test during the wheel test phase. This is how I reproduced it locally in case you want to check it out: conda create --name TEST python=3 pip
pip install netcdf4
python -c "import netCDF4; ds = netCDF4.Dataset('http://thredds.socib.es/thredds/dodsC/hf_radar/hf_radar_ibiza-scb_codarssproc001/L1/2016/dep0001_hf-radar-ibiza_scb-codarssproc001_L1_2016-02.nc')"
Error:curl error: Problem with the SSL CA cert (path? access rights?)
curl error details:
Warning:oc_open: Could not read url
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "src/netCDF4/_netCDF4.pyx", line 2353, in netCDF4._netCDF4.Dataset.__init__
File "src/netCDF4/_netCDF4.pyx", line 1963, in netCDF4._netCDF4._ensure_nc_success
OSError: [Errno -68] NetCDF: I/O failure: b'http://thredds.socib.es/thredds/dodsC/hf_radar/hf_radar_ibiza-scb_codarssproc001/L1/2016/dep0001_hf-radar-ibiza_scb-codarssproc001_L1_2016-02.nc' Then, if I do a conda install netcdf4, the test pass and I have these packages installed:
|
I believe that the wheel should be rebuilt. One test folks could try is to conda install it on colab and see if that works. |
I was having the same problem. I installed once with "%pip install netcdf4<1.6" and once with "%pip install netcdf4<1.6". I can confirm it works with one, but not the other. For each, I used
Below is a more narrow list of just where versions have changed.
|
The newest release (1.6.1) hasn't fixed the problems for my use case either:
|
@jswhit, I am available to do some digging and try to solve this issue since it is causing a lot of problem for other libraries. Do you have any suggestions to where should I start looking? |
This is not a solution, just a work around, but you can try: !pip install -q condacolab
import condacolab
condacolab.install()
import condacolab
condacolab.check()
!mamba install netcdf4 and then, import netCDF4
ds = netCDF4.Dataset('http://thredds.socib.es/thredds/dodsC/hf_radar/hf_radar_ibiza-scb_codarssproc001/L1/2016/dep0001_hf-radar-ibiza_scb-codarssproc001_L1_2016-02.nc') I'll check the openssl version used and try to add a regression test in the wheel building process to investigate. I can confirm that this doesn't happen in the Windows wheel and @ngam confirmed it doesn't happen in the M1 wheel. It must be the Linux openssl version then. |
In the Aug 8 traceback above (and pasted below), the URL string gets turned into a byte string by netCDF4. Could that be relevant? I had this problem and fixed it by using an older version of netCDF4 that keeps the string as a string. There was a similar issue with strings converted to byte strings 2 years ago: pydata/xarray#4859 Traceback (most recent call last): |
Still having this problem with netcdf4==1.6.3. |
I just used the colab notebook pinned in the first comment and used the new I think this issue was solved. See #1246 (comment) |
Recently, reading OPeNDAP files when running notebooks on Google Colab resutss in an OSError:
[Errno -68] NetCDF: I/O failure
Relevant info:
Example code:
Error:
Colab Notebook link: https://colab.research.google.com/drive/17juZulxoz8sahoDJVuU4uOMSnBC_xXDA?usp=sharing
The text was updated successfully, but these errors were encountered: