PyPSA-Eur: A Sector-Coupled Open Optimisation Model of the European Energy System
309
stars
208
forks
source link
AttributeError: 'GeoDataFrame' object has no attribute 'from_country' in build_gas_input_locations.py #1126
Open
fhg-isi opened 4 days ago
Describe the Bug
When trying to run
python scripts/build_gas_input_locations.py
I get the error below at
The available columns are
=> Replace calls like
df.param.apply(pd.Series)
Error Message
(pypsa-eur) projekt-resilient03@ubuntu-22-04-lts-temp:~/pypsa-eur$ python scripts/build_gas_input_locations.py ERROR:root:Uncaught exception Traceback (most recent call last): File "/home/projekt-resilient03/pypsa-eur/scripts/build_gas_input_locations.py", line 171, in
gas_input_locations = build_gas_input_locations(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/projekt-resilient03/pypsa-eur/scripts/build_gas_input_locations.py", line 110, in build_gas_input_locations
entry["from_country"] = entry.from_country.str.rstrip()
^^^^^^^^^^^^^^^^^^
File "/home/projekt-resilient03/conda/envs/pypsa-eur/lib/python3.11/site-packages/pandas/core/generic.py", line 6299, in getattr
return object.getattribute(self, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GeoDataFrame' object has no attribute 'from_country'
Related:
https://github.com/PyPSA/pypsa-eur/issues/1121
https://github.com/PyPSA/pypsa-eur/issues/1125
https://github.com/PyPSA/pypsa-eur/issues/1118