Closed ChetGoerzen closed 2 years ago
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible.
You might also want to take a look at our Contributing Guide and Code of Conduct.
Thanks @ChetGoerzen for opening this issue.
This error is raised when xarray
tries to import gdal_version
from rasterio._base
, so I think we should open an issue on xarray
repository reporting this. Meanwhile would be better to pin the rasterio
version on Rockhound environment.yml
and requirements.txt
files. Would you like to open a PR with these changes?
CC @leouieda
Hi @santisoler,
I've pinned the rasterio
version to 1.0.24 in requirements.txt
and the environment.yml
file in the Fetch Models WIP (#52 ) pull request. However, the build pipeline fails for Mac Python 37 and Mac Python 36. The failure occurs in the Setup Miniconda phase of the build. The error appears to be with a file called /Users/vsts/.conda/pkgs/urls.txt. According to Run pipelines with Anaconda environments, on Hosted macOS the agent user doesn't have ownership of Miniconda's installation directory. I suspect that this is why the Mac builds fail while the Windows builds pass. Are administrator privileges required to update the packages installed by conda in the build?
CC @leouieda
Hi @ChetGoerzen!
I got a response on https://github.com/pydata/xarray/issues/3230. Seems the problem was somehow related with the conda installation of rasterio
. I tried to install rasterio 1.0.25
through pip
and had no problem. So, I tried to reinstall rasterio
with conda from scratch, and had no problem either.
So, please try the following:
conda activate rockhound
conda uninstall rasterio
conda install rasterio
Then try:
python -c "import rasterio"
If you don't get any error, then it's very likely you can run fetch_bedmap2
without any problem.
If this solves the issue, then we don't need to pin rasterio
to 1.0.24
.
Update
I rerun Travis for the last commit on master
and it fails when importing rasterio
, so I think there's still a problem with the conda installation of rasterio
.
Regarding the pipelines problem, I don't think it is intimately related with this issue, so maybe we could discuss it on #52 or even open a new issue for it. Nevertheless, the builds install the packages on every run from either creating a conda
environment from the current environment.yml
file or through pip
, getting the dependencies from requirements.txt
. So you don't need administration privileges.
@leouieda Could you throw some light on this when you have some time?
When running the test suite the test for bedmap2 fails with the current version of rasterio. The issue appears to be in line 102 of fetch_bedmap2.py. A call to xr.open_rasterio requires an import
from rasterio._base import gdal_version
which fails. This problem can be resolved by using version 1.0.24 of rasterio.Full code that generated the error
Full error message
System information
conda list
below:output of conda list