Skip to content

Test case322_3min_final failed in from_pickle() #51

Description

@bh4rtp2023

I use the downloaded dataset, the pandapower version is 3.3.0.

(mapdn) PS D:\src\python\mapdn> python train.py --alg matd3 --alias 0 --mode distributed --scenario case322_3min_final --voltage-barrier-type l1 --save-path trial
Traceback (most recent call last):
File "C:\anaconda3\envs\mapdn\lib\site-packages\pandas\core\indexes\base.py", line 3812, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7096, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'type'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\src\python\mapdn\train.py", line 49, in
env = VoltageControl(env_config_dict)
File "D:\src\python\mapdn\environments\var_voltage_control\voltage_control_env.py", line 50, in init
self.base_powergrid = self._load_network()
File "D:\src\python\mapdn\environments\var_voltage_control\voltage_control_env.py", line 405, in _load_network
base_net = pp.from_pickle(network_path)
File "C:\Users\Allen Chen\anaconda3\envs\mapdn\lib\site-packages\pandapower\file_io.py", line 167, in from_pickle
convert_format(net)
File "C:\Users\Allen Chen\anaconda3\envs\mapdn\lib\site-packages\pandapower\convert_format.py", line 39, in convert_format
_add_missing_columns(net, elements_to_deserialize)
File "C:\Users\Allen Chen\anaconda3\envs\mapdn\lib\site-packages\pandapower\convert_format.py", line 441, in _add_missing_columns
net.sgen["current_source"] = net.sgen["type"].apply(
File "C:\Users\Allen Chen\anaconda3\envs\mapdn\lib\site-packages\pandas\core\frame.py", line 4113, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\Allen Chen\anaconda3\envs\mapdn\lib\site-packages\pandas\core\indexes\base.py", line 3819, in get_loc
raise KeyError(key) from err
KeyError: 'type'

How to fix this? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions