You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0%| | 0/96 [00:00<?, ?it/s]Traceback (most recent call last):
File "<ipython-input-18-0886297f146e>", line 3, in <module>
run_timeseries(net_0, time_steps=range(timesteps),run=pp.runpp, continue_on_divergence=False, verbose=True, check_controllers=True, numba=False, run_control=True, calculate_voltage_angles=False)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\timeseries\run_time_series.py", line 361, in run_timeseries
run_loop(net, ts_variables, **kwargs)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\timeseries\run_time_series.py", line 329, in run_loop
run_time_step(net, time_step, ts_variables, run_control_fct, output_writer_fct, **kwargs)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\timeseries\run_time_series.py", line 129, in run_time_step
run_control_fct(net, ctrl_variables=ts_variables, **kwargs)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\control\run_control.py", line 300, in run_control
ctrl_variables = net_initialization(net, ctrl_variables, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandapower\control\run_control.py", line 162, in net_initialization
run_funct(net, **kwargs) # run can be runpp, runopf or whatever
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandapower\run.py", line 241, in runpp
_powerflow(net, **kwargs)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\powerflow.py", line 86, in _powerflow
_ppci_to_net(result, net)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\powerflow.py", line 196, in _ppci_to_net
_extract_results(net, result)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\results.py", line 34, in _extract_results
_get_branch_results(net, ppc, bus_lookup_aranged, bus_pq)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\results_branch.py", line 44, in _get_branch_results
_get_switch_results(net, i_ft, suffix=suffix)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\results_branch.py", line 683, in _get_switch_results
_copy_switch_results_from_branches(net, suffix)
File "D:\pythonProject\venv\Lib\site-packages\pandapower\results_branch.py", line 709, in _copy_switch_results_from_branches
net[res_switch_df].loc[open_switches, current_parameter] = 0
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexing.py", line 845, in __setitem__
indexer = self._get_setitem_indexer(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexing.py", line 710, in _get_setitem_indexer
return self._convert_tuple(key)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexing.py", line 927, in _convert_tuple
keyidx = [self._convert_to_indexer(k, axis=i) for i, k in enumerate(key)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexing.py", line 927, in <listcomp>
keyidx = [self._convert_to_indexer(k, axis=i) for i, k in enumerate(key)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexing.py", line 1426, in _convert_to_indexer
return self._get_listlike_indexer(key, axis)[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexing.py", line 1462, in _get_listlike_indexer
keyarr, indexer = ax._get_indexer_strict(key, axis_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexes\base.py", line 5876, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "D:\pythonProject\venv\Lib\site-packages\pandas\core\indexes\base.py", line 5935, in _raise_if_missing
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index([-2, -2, -1, -2, -1, -1, -2, -2, -1, -2, -2, -2], dtype='object')] are in the [index]"
Expected Behavior
When I add new switches and lines to my network, this traceback appears. Before I added new lines and switches the timeseries powerflow calculation works. The initial Network where is no traceback in the timeseries powerflow is attached. mv_net_2040.json
Installed Versions
python version:3.11
pandas version:2.0.0
networkx version:3.1
scipy version: 1.10.1
numpy version: 1.24.2
packaging version: 23.1
tqdm version:4.65.0
deepdiff version:6.3.0
Operating System name/version: Windows 11
Label
Relevant labels are selected
The text was updated successfully, but these errors were encountered:
i found the issue in results_branch.py in function _copy_switch_results_from_branches where open_switches=~net.switch.closed.values defined. this mask returns the index shown in the Error Log. I changed it to a list containing the indices of switches that are open/not closed and that worked for me.
Bug report checklis
Searched the issues page for similar reports
Read the relevant sections of the documentation
Browse the tutorials and tests for usefull code snippets and examples of use
Reproduced the issue after updating with
pip install --upgrade pandapower
(orgit pull
)Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
Issue Description and Traceback
Expected Behavior
When I add new switches and lines to my network, this traceback appears. Before I added new lines and switches the timeseries powerflow calculation works. The initial Network where is no traceback in the timeseries powerflow is attached.
mv_net_2040.json
Installed Versions
Label
The text was updated successfully, but these errors were encountered: