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

rasterio.errors.CRSError: The WKT could not be parsed. OGR Error code 6 #522

Closed
2 tasks done
pz-max opened this issue Nov 19, 2022 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@pz-max
Copy link
Member

pz-max commented Nov 19, 2022

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-earth environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

Please provide a description of what the bug is and add a minimal example/command for reproducing the bug.

Error Message

Our rasterio version is restricted in PyPSA-Earth to rasterio!=1.2.10
When deinstallaing pypsa-earth conda remove --name pypsa-earth --all and installing it from scratch conda env create -f envs/environment.yaml I get the following error when running the workflow:

rasterio.errors.CRSError: The WKT could not be parsed. OGR Error code 6 (appears in build_natura raster rule)

When the patch-4 of @davide-f Atlite fork is merged the issue should disappear.
Let me explain how the error appears. Our rasterio version is restricted in PyPSA-Earth to rasterio!=1.2.10. By default anaconda resolves the version in PyPSA-Earth such that rasterio=1.2.9. Well that so far no problem. However, since atlite is in PyPSA-Earth forked and can be only installed over pip, pip will overwrite the 1.2.9 version because atlite enforces rasterio>=1.2.10. What pip will install is than either rasterio==1.3.3 and rasterio==1.3.4. But why does that trigger an error? My assumption after reading some stuff: rasterio, gdal and fiona should be installed with the same conda installation --> updating one of it afterwards can cause issues.

The patch-4 solution makes out of rasterio>=1.2.10 now rasterio!=1.2.10. This will lead to the case that rasterio will not be reinstalled by the pip process:

pip:
    - git+https://github.com/davide-f/atlite.git@master 
@pz-max pz-max added the bug Something isn't working label Nov 19, 2022
@pz-max
Copy link
Member Author

pz-max commented Nov 30, 2022

Contribution are merged in Atlite and Davides Atlite fork

@pz-max pz-max closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant