Travis CI fails with a segmentation fault.
import xarray as xr
from pathlib import Path
here = Path(__file__).parent
url1 = "http://test.opendap.org:8080/opendap/netcdf/examples/tos_O1_2001-2002.nc"
url2 = "http://test.opendap.org:8080/opendap/netcdf/examples/sresa1b_ncar_ccsm3_0_run1_200001.nc"
for n, url in enumerate([url2, url1]):
ds = xr.open_dataset(url)
ds.to_netcdf(str(here / f'{n}.nc'))
Notice how no part of finch or pywps is touched in this code. The error we get is either:
1] 22220 segmentation fault (core dumped) env USER=ubuntu SHLVL=0 HOME=/home/ubuntu LOGNAME=ubuntu NAME=###my_hostname###
Or when we use opendap files from pavics.ouranos.ca, we actually get a traceback:
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/finch/lib/python3.6/site-packages/xarray/backends/file_manager.py", line 240, in __del__
self.close(needs_lock=False)
File "/home/ubuntu/miniconda3/envs/finch/lib/python3.6/site-packages/xarray/backends/file_manager.py", line 218, in close
file.close()
File "netCDF4/_netCDF4.pyx", line 2485, in netCDF4._netCDF4.Dataset.close
File "netCDF4/_netCDF4.pyx", line 2449, in netCDF4._netCDF4.Dataset._close
File "netCDF4/_netCDF4.pyx", line 1887, in netCDF4._netCDF4._ensure_nc_success
RuntimeError: NetCDF: cannot delete file
python: /home/conda/feedstock_root/build_artifacts/libnetcdf_1574519229483/work/libdap2/dceconstraints.c:512: dcefree: Assertion `0' failed.
I will try to simplify the python environment in which I encounter this issue to see if I can isolate a particular library, and keep this issue updated of my findings.