Open doneachh opened 10 months ago
Debugged the error:
As df_exploded is an empty dataframe, we get an empty dataframe with no columns by doing "pd.DataFrame(df_exploded["nodes"].tolist())" --> there is no [1] --> 1 out of range
df_exploded gets set by pipelines_per_state --> also empty, which gets set by pipelines_interstate --> also empty
Now it gets interesting: pipelines_interstate gets set by "pipelines.drop(pipelines.loc[pipelines.amount_states_passed < 2].index)"
pipelines isnt empty:
but there isn't a single one with "amount_states_passed >= 2":
--> pipelines_interstate always empty --> pipelines_per_state empty --> df_exploded empty --> KeyError: 1
As there is no limitation to the country at this point, this should be the case for every country / continent run. But why does it work for the CI then?
Must be something with the config (?), but config at "sector" is basically the same like config.test1 (except SMR:false instead of true).
@Eddy-JV Do you have an idea? :)
That error seems familiar. It should have been solved here: https://github.com/pypsa-meets-earth/pypsa-earth-sec/pull/285
It may be time that I decompose part of this PR... (soon)
Hi @doneachh and @davide-f ,
The error is emerging due to the fact that not all countries have existing gas infrastructure in GGIT and in reality also. I tested the workflow on countries that do have it. So I will fix the issue within prepare_gas_network without adding any additional if clause in the Snakefile.
Checklist
main
branch or the latest release. Please indicate.pypsa-africa
environment. Update viaconda env update -f envs/environment.yaml
.Describe the Bug
No idea right now. Trying to debug asap. Same issue for Africa and Namibia.
Error Message