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

Unable to read OpenDAP with 1.6.4, manual creation of ~/.esg required #1278

Open
BSchilperoort opened this issue Oct 4, 2023 · 3 comments
Open

Comments

@BSchilperoort
Copy link

BSchilperoort commented Oct 4, 2023

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")
@jswhit
Copy link
Collaborator

jswhit commented Oct 4, 2023

did you install both 1.6.2 and 1.6.4 via pip (using binary wheels)?

@BSchilperoort
Copy link
Author

Yes, they were both installed using pip, which grabbed the binary wheels.

@jswhit
Copy link
Collaborator

jswhit commented Oct 9, 2023

it's an issue with netcdf-c 4.9.2, which is used in the 1.6.4 wheel.

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

No branches or pull requests

2 participants