-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix OSError on _nc_dataset method #271
Conversation
- Fix from bravoserver/bravo#111 - This error is further documented on Stack Overflow (see ioos#261 for discussion)
- Forcibly delete file when 'delete' is False
Call tmp.name only once (see https://docs.python.org/3/library/tempfile.html\#tempfile.NamedTemporaryFile)
- Set delete=True on tmp instead of manually unlinking
import httpx | ||
import iris | ||
import pytest | ||
import xarray as xr | ||
|
||
from erddapy import ERDDAP | ||
|
||
dask.config.set(scheduler="single-threaded") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a better workaround for the netcdf 1.6.1 problem. Netcdf-c is not thread safe and we should not rely on it.
|
||
# Delete flag must be False when using Windows | ||
# The file will be closed in the 'finally' block | ||
delete = False if platform == "win32" else True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is not working. Was this failing on Windows before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI started failing when I introduced the data.seek(0)
line in 061bf1a
@vinisalazar in light of #272 do we still need this one? |
I don't think we do. Thanks! |
Hi,
this is in relation to #261.
Summary of changes
to_xarray
method error on OS X #261)Thanks,
V