netcdf4-python
netcdf4-python copied to clipboard
Unable to read OpenDAP with 1.6.4, manual creation of ~/.esg required
System info:
- OS: Linux Mint
- Python version: 3.10
- python-netCDF4 version: 1.6.4
When trying to read an OpenDAP url with netCDF4==1.6.4, I get the following error:
Cookie file cannot be read and written: /home/username/.esg/.dods_cookies
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "src/netCDF4/_netCDF4.pyx", line 2464, in netCDF4._netCDF4.Dataset.__init__
File "src/netCDF4/_netCDF4.pyx", line 2027, in netCDF4._netCDF4._ensure_nc_success
OSError: [Errno -37] NetCDF: Write to read only: 'http://iridl.ldeo.columbia.edu/SOURCES/.OSU/.PRISM/.monthly/dods'
It works fine in 1.6.2.
However, when creating the folder ~/.esg, the OpenDAP dataset loaded in fine. in 1.6.4.
Used code:
import netCDF4
dataset = netCDF4.Dataset("http://iridl.ldeo.columbia.edu/SOURCES/.OSU/.PRISM/.monthly/dods")
did you install both 1.6.2 and 1.6.4 via pip (using binary wheels)?
Yes, they were both installed using pip, which grabbed the binary wheels.
it's an issue with netcdf-c 4.9.2, which is used in the 1.6.4 wheel.