Error in build_renewable_profiles PyPSA-Eur

33 views
Skip to first unread message

Hannes Findeisen

unread,
Apr 8, 2025, 11:12:34 AMApr 8
to pypsa
Hi all,

I am quit new with PyPSA-Eur and tried some different configurations to run solve_elec_s_256_base with the entsoegridkit for DE, AT and CH to mainly optimize the dispatch. Unfortunately I get always the same error message in the build_renewable_profiles rule:

INFO:__main__:correction_factor is set as 0.8855
ERROR:root:Uncaught exception
Traceback (most recent call last):
  File "C:\Users\Administrator\Documents\pypsa-eur\.snakemake\scripts\tmp3uic_rgk.build_renewable_profiles.py", line 157, in <module>
    regions = regions.loc[offshore_regions]
              ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\miniconda3\envs\pypsa-eur\Lib\site-packages\pandas\core\indexing.py", line 1191, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\miniconda3\envs\pypsa-eur\Lib\site-packages\pandas\core\indexing.py", line 1420, in _getitem_axis
    return self._getitem_iterable(key, axis=axis)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\miniconda3\envs\pypsa-eur\Lib\site-packages\pandas\core\indexing.py", line 1360, in _getitem_iterable
    keyarr, indexer = self._get_listlike_indexer(key, axis)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\miniconda3\envs\pypsa-eur\Lib\site-packages\pandas\core\indexing.py", line 1558, in _get_listlike_indexer
    keyarr, indexer = ax._get_indexer_strict(key, axis_name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\miniconda3\envs\pypsa-eur\Lib\site-packages\pandas\core\indexes\base.py", line 6200, in _get_indexer_strict
    self._raise_if_missing(keyarr, indexer, axis_name)
  File "C:\Users\Administrator\miniconda3\envs\pypsa-eur\Lib\site-packages\pandas\core\indexes\base.py", line 6252, in _raise_if_missing
    raise KeyError(f"{not_found} not in index")
KeyError: "['DE0 95'] not in index"

Everytime is some element not found. So it is very similar to problem posted April 1st.
I would be very grateful, if someone could help me with this.
Thank you in advance!

Best,
Hannes


Hannes Findeisen

unread,
Apr 10, 2025, 3:34:06 AMApr 10
to pypsa
I changed back to the OSM-prebuilt version, and it works fine.
Reply all
Reply to author
Forward
0 new messages