Replies: 6 comments
-
Hello @amnanni and thanks for reporting! The problem looks like an environment problem. Could you please share the output of |
Beta Was this translation helpful? Give feedback.
-
Hi @ekatef and thanks for the quick response! (pypsa-earth) C:\OASES\pypsa-earth\pypsa-earth>conda list packages in environment at C:\Users\amnanni\Miniconda3\envs\pypsa-earth:Name Version Build Channelaffine 2.4.0 pyhd8ed1ab_0 conda-forge |
Beta Was this translation helpful? Give feedback.
-
Hello @amnanni and thanks a lot for the detailed report. I confirm that something definitely is wrong with the environment. At the moment, I can't reproduce the issue for It looks like there has been a major release of As a quick fix, it seems like the issues may be resolved by adding to the |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for helping @ekatef ! I added the new version restriction on geopandas as you advised but unfortunately the same error remains: (pypsa-earth) C:\OASES\pypsa-earth\pypsa-earth>snakemake --cores 1 solve_all_networks add_electricity 1 Select jobs to execute... [Tue Jun 25 10:36:22 2024] WARNING:eo.gfk:code not found for comores so using id RuleException: (pypsa-earth) C:\OASES\pypsa-earth\pypsa-earth> |
Beta Was this translation helpful? Give feedback.
-
@amnanni thanks a lot for notifying! Unfortunately, I can't reproduce the error you are facing. To be sure that a new environment specification has worked, I'd recommend to remove the old environment completely and install a new one using the updated |
Beta Was this translation helpful? Give feedback.
-
@ekatef Thanks a lot for the help, not trivial at all - it solved the problem!! I ran into another Error (OSError: [WinError 10055] An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full) but this one I think is due to lack of capacity on my laptop and I need to solve it on my own. |
Beta Was this translation helpful? Give feedback.
-
Hello! I get the following error when trying to run the model for Africa. I have already tried e.g. reinstalling GDAL, Fiona and Pyogrio with dependencies and ensured that GDAL_DATA and PROJ_LIB variables are correctly set in my environment.
Any suggestions on how to proceed? Thanks in advance!
(pypsa-earth) C:\OASES\pypsa-earth\pypsa-earth>snakemake --cores 1 solve_all_networks
Restricted license - for non-production use only - expires 2025-11-24
C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\pulp\apis\gurobi_api.py:170: UserWarning: GUROBI error: Unknown parameter '_test'.
warnings.warn("GUROBI error: {}.".format(e))
C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\pypsa\networkclustering.py:16: UserWarning: The namespace
pypsa.networkclustering
is deprecated and will be removed in PyPSA v0.24. Please usepypsa.clustering.spatial instead
.warnings.warn(
Building DAG of jobs...
Provided cores: 1 (use --cores to define parallelism)
Rules claiming more threads will be scaled down.
Job stats:
job count
add_electricity 1
add_extra_components 1
base_network 1
build_bus_regions 1
build_demand_profiles 1
build_osm_network 1
build_powerplants 1
build_renewable_profiles 6
build_shapes 1
clean_osm_data 1
cluster_network 1
copy_defaultnatura_tiff 1
download_osm_data 1
prepare_network 1
retrieve_databundle_light 1
simplify_network 1
solve_all_networks 1
solve_network 1
total 23
Select jobs to execute...
[Wed Jun 19 14:22:58 2024]
rule download_osm_data:
output: resources/osm/raw/all_raw_cables.geojson, resources/osm/raw/all_raw_generators.geojson, resources/osm/raw/all_raw_generators.csv, resources/osm/raw/all_raw_lines.geojson, resources/osm/raw/all_raw_substations.geojson
log: logs/download_osm_data.log
jobid: 15
benchmark: benchmarks/download_osm_data
reason: Missing output files: resources/osm/raw/all_raw_cables.geojson, resources/osm/raw/all_raw_lines.geojson, resources/osm/raw/all_raw_substations.geojson, resources/osm/raw/all_raw_generators.geojson
resources: tmpdir=C:\Users\amnanni\AppData\Local\Temp\1
WARNING:eo.gfk:code not found for comores so using id
INFO:eo.utils:File writer initialized with region_list: ['NE', 'SN-GM', 'MR', 'LS', 'ZA', 'SC', 'NG', 'CF', 'MW', 'GW', 'GA', 'ST', 'GQ', 'CD', 'CG', 'BF', 'SO', 'LR', 'UG', 'DJ', 'BW', 'GH', 'TG', 'AO', 'SS', 'SL', 'TZ', 'LY', 'RW', 'ER', 'ML', 'BI', 'comores', 'MU', 'ET', 'BJ', 'DZ', 'NA', 'MZ', 'SD', 'ZM', 'TN', 'MG', 'GN', 'CM', 'CV', 'MA', 'ZW', 'SZ', 'SN-GM', 'TD', 'CI', 'KE', 'MA', 'EG'], primary_name: power, feature_list: ['substation']
INFO:eo.utils:Output file written to: C:\OASES\pypsa-earth\pypsa-earth\resources\osm\raw\out\AO_BF_BI_BJ_BW__37db7d40_substation.csv
INFO:pyogrio._env:Found GDAL at C:\Users\amnanni\Miniconda3\envs\pypsa-earth\Library\bin
ERROR:_helpers:An error happened in module 'C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\geopandas\io\file.py', function '_check_engine': The 'to_file' method requires the 'pyogrio' or 'fiona' package, but neither is installed or imports correctly.
Importing fiona resulted in: DLL load failed while importing _env: The specified module could not be found.
Importing pyogrio resulted in: DLL load failed while importing _ogr: The specified module could not be found.
Traceback (most recent call last):
File "C:\OASES\pypsa-earth\pypsa-earth.snakemake\scripts\tmp7m6jr1fi.download_osm_data.py", line 112, in
eo.save_osm_data(
File "C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\earth_osm\eo.py", line 162, in save_osm_data
with OutFileWriter(region_short_list, primary_name, [feature_name], out_dir, out_format) as writer:
File "C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\earth_osm\utils.py", line 272, in exit
gdf_feature.to_file(
File "C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\geopandas\geodataframe.py", line 1249, in to_file
_to_file(self, filename, driver, schema, index, **kwargs)
File "C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\geopandas\io\file.py", line 576, in _to_file
engine = _check_engine(engine, "'to_file' method")
File "C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\site-packages\geopandas\io\file.py", line 122, in _check_engine
raise ImportError(
ImportError: The 'to_file' method requires the 'pyogrio' or 'fiona' package, but neither is installed or imports correctly.
Importing fiona resulted in: DLL load failed while importing _env: The specified module could not be found.
Importing pyogrio resulted in: DLL load failed while importing _ogr: The specified module could not be found.
[Wed Jun 19 14:25:19 2024]
Error in rule download_osm_data:
jobid: 15
output: resources/osm/raw/all_raw_cables.geojson, resources/osm/raw/all_raw_generators.geojson, resources/osm/raw/all_raw_generators.csv, resources/osm/raw/all_raw_lines.geojson, resources/osm/raw/all_raw_substations.geojson
log: logs/download_osm_data.log (check log file(s) for error details)
RuleException:
CalledProcessError in file C:\OASES\pypsa-earth\pypsa-earth\Snakefile, line 181:
Command 'C:/Users/amnanni/Miniconda3/envs/pypsa-earth/python.exe "C:\OASES\pypsa-earth\pypsa-earth.snakemake\scripts\tmp7m6jr1fi.download_osm_data.py"' returned non-zero exit status 1.
File "C:\OASES\pypsa-earth\pypsa-earth\Snakefile", line 181, in __rule_download_osm_data
File "C:\Users\amnanni\Miniconda3\envs\pypsa-earth\lib\concurrent\futures\thread.py", line 58, in run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake\log\2024-06-19T142241.582290.snakemake.log
Beta Was this translation helpful? Give feedback.
All reactions