openego / eTraGo

Optimization of flexibility options for transmission grids based on PyPSA
GNU Affero General Public License v3.0
31 stars 13 forks source link

TypeError in cluster_on_extra_high_voltage #378

Closed KathiEsterl closed 2 years ago

KathiEsterl commented 2 years ago

I tried executing etrago on this branch, but got this TypeError:

Traceback (most recent call last):

  File "/home/kathiesterl/Git/eTraGo/etrago/appl.py", line 383, in <module>
    etrago = run_etrago(args, json_path=None)

  File "/home/kathiesterl/Git/eTraGo/etrago/appl.py", line 348, in run_etrago
    etrago.ehv_clustering()

  File "/home/kathiesterl/Git/eTraGo/etrago/cluster/networkclustering.py", line 669, in ehv_clustering
    self.network, busmap, with_time=True

  File "/home/kathiesterl/Git/eTraGo/etrago/cluster/networkclustering.py", line 349, in cluster_on_extra_high_voltage
    network, busmap, with_time, custom_strategies=strategies_generators()

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pypsa/networkclustering.py", line 97, in aggregategenerators
    pnl_df = df_agg.groupby(grouper, axis=1).sum()

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/frame.py", line 6525, in groupby
    dropna=dropna,

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/groupby/groupby.py", line 533, in __init__
    dropna=self.dropna,

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/groupby/grouper.py", line 773, in get_grouper
    if is_in_obj(gpr):  # df.groupby(df['name'])

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/groupby/grouper.py", line 765, in is_in_obj
    return gpr is obj[gpr.name]

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/frame.py", line 2881, in __getitem__
    indexer = convert_to_index_sliceable(self, key)

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/indexing.py", line 2144, in convert_to_index_sliceable
    return idx._get_string_slice(key)

  File "/home/kathiesterl/vetrago/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 680, in _get_string_slice
    parsed, reso = parsing.parse_time_string(key, freq)

TypeError: Argument 'arg' has incorrect type (expected str, got quoted_name)

I haven't installed etrago newly and used the "old" etrago-environment. Do I maybe just need some other package version or something?

@ClaraBuettner, can you help me with this? Thank you!

ClaraBuettner commented 2 years ago

There are some new requirements and limitations for package versions, so I would create a new environment.