You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the current main branch or the latest release. Please indicate.
I am running on an up-to-date pypsa-africa environment. Update via conda env update -f envs/environment.yaml.
Describe the Bug
We receive a TypeError in rule prepare_gas_network, as we put two digits codes into the method three_2_two_digits_code (--> returns nan value) and try to add them with a string value afterwards.
Error Message
Traceback (most recent call last):
File "/mnt/l/Git/Africa/pypsa-earth-sec/.snakemake/scripts/tmpvjh_6i9i.prepare_gas_network.py", line 924, in<module>
pipelines["bus0"] = pipelines["bus0"].apply(
File "/home/aca39878/anaconda3/envs/pypsa-earth/lib/python3.10/site-packages/pandas/core/series.py", line 4924, in apply
).apply()
File "/home/aca39878/anaconda3/envs/pypsa-earth/lib/python3.10/site-packages/pandas/core/apply.py", line 1427, in apply
returnself.apply_standard()
File "/home/aca39878/anaconda3/envs/pypsa-earth/lib/python3.10/site-packages/pandas/core/apply.py", line 1507, in apply_standard
mapped = obj._map_values(
File "/home/aca39878/anaconda3/envs/pypsa-earth/lib/python3.10/site-packages/pandas/core/base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "/home/aca39878/anaconda3/envs/pypsa-earth/lib/python3.10/site-packages/pandas/core/algorithms.py", line 1743, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
File "/mnt/l/Git/Africa/pypsa-earth-sec/.snakemake/scripts/tmpvjh_6i9i.prepare_gas_network.py", line 925, in<lambda>
lambda id: three_2_two_digits_country(id[:3]) + id[3:]
TypeError: unsupported operand type(s) for +: 'float' and 'str'
[Sat Jun 1 22:51:19 2024]
Error in rule prepare_gas_network:
jobid: 25
input: /mnt/l/Git/Africa/pypsa-earth-sec/pypsa-earth/resources/bus_regions/regions_onshore_elec_s_165.geojson
output: resources/gas_networks/gas_network_elec_s_165.csv, resources/gas_networks/existing_gas_pipelines__165.png, resources/gas_networks/clustered_gas_pipelines__165.png
RuleException:
CalledProcessError in file /mnt/l/Git/Africa/pypsa-earth-sec/Snakefile, line 158:
Command 'set -euo pipefail; /home/aca39878/anaconda3/envs/pypsa-earth/bin/python3.10 /mnt/l/Git/Africa/pypsa-earth-sec/.snakemake/scripts/tmpvjh_6i9i.prepare_gas_network.py' returned non-zero exit status 1.
File "/mnt/l/Git/Africa/pypsa-earth-sec/Snakefile", line 158, in __rule_prepare_gas_network
File "/home/aca39878/anaconda3/envs/pypsa-earth/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Removing output files of failed job prepare_gas_network since they might be corrupted:
resources/gas_networks/existing_gas_pipelines__165.png
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
The text was updated successfully, but these errors were encountered:
Checklist
main
branch or the latest release. Please indicate.pypsa-africa
environment. Update viaconda env update -f envs/environment.yaml
.Describe the Bug
We receive a TypeError in rule prepare_gas_network, as we put two digits codes into the method three_2_two_digits_code (--> returns nan value) and try to add them with a string value afterwards.
Error Message
The text was updated successfully, but these errors were encountered: