-
Notifications
You must be signed in to change notification settings - Fork 4
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
Solved import Error of Rasterio | Solved 3 Warnings #16
base: main
Are you sure you want to change the base?
Conversation
(get_weather_data, map_costs, optimize_hydrogen_plant) Two warnings in optimize_hydrogen_plant.py solved Accessing series by position with .iloc, and Non-integer 'periods' in 'pd.date_range'
Just wondering which rasterio version you had in your environment? I've not had this issue come up on mine and want to investigate whether it is a problem that occurs with a particular version. |
I am using rasterio 1.3.6 with Python version 3.11.8. The given requirement file didn't work for me, so I created my environment. This is how my requirement yml-file looks:
|
Thanks for this, Lukas. Which OS do you use and did this issue come up when you were using the repo's environment or your own environment? |
Hey Sami, my OS is Windows 11 Pro. Adding the line "from osgeo import gdal" does not affect the code/model/performance, but just imports a package which is already existent in the current environment. It could be beneficial for users who want to use their environment because this error does not appear. |
I appreciate this information, as I'm trying to understand how your issue came about in the first place as I have others who use Windows and their own environments and they have not had this issue. This understanding will just make it easier for documentation of the code. When the ImportError came up, were you using the repo's environment or with your own environment? |
Initially, the model did not run for me, and I had to solve the import error. After that, it ran smoothly.
Import Error of Rasterio
For me, the import of rasterio failed and gave the following error:
I could solve it by adding the following line before importing other packages in the files optimize_hydrogen_plant, get_weather_data, map_costs:
Three Warnings
Three warnings in optimize_hydrogen_plant.py solved: