We get the following error trying to init a Grid2Op env with PyPowSyBl2Grid backend with Grid2Op v1.13 and not with earlier versions of it. The error is:
Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
'NoneType' object is not subscriptable
File "/home/razolalf/Documents/Code/pf_projector/.venv/lib/python3.12/site-packages/grid2op/Backend/backend.py", line 2245, in get_shunt_setpoint
p_s[sh_conn] *= (self._sh_vnkv[sh_conn] / sh_v[sh_conn]) ** 2
~~~~~~~~~~~~~^^^^^^^^^
File "/home/razolalf/Documents/Code/pf_projector/.venv/lib/python3.12/site-packages/grid2op/Environment/_env_prev_state.py", line 172, in update_from_backend
shunt_p, shunt_q, shunt_bus = backend.get_shunt_setpoint()
This seems to be linked to changes made in Grid2Op v1.13 associated with changes made in this PR
To reproduce : Try to init a grid2Op env with this backend and Grid2Op v1.13:
backend = PyPowSyBlBackend(
detailed_infos_for_cascading_failures=False,
can_be_copied=True,
check_isolated_and_disconnected_injections=None,
consider_open_branch_reactive_flow=False,
connect_all_elements_to_first_bus=False,
n_busbar_per_sub=6,
)
backend._prevent_automatic_disconnection = False
Then
grid2op_env = grid2op.make(
grid2op_env_dir,
backend=backend,
allow_detachment=True, # True because in the initial grid.xiidm some loads are disconnected so we need to drop them
n_busbar=6,
chronics_class=ChangeNothing,
param=grid2op_params,
)
With an .xiidm network simply loaded from PF_STANWAY/2026/01/22/PtFige-20260122-1055-enrichi.arc.xz
We get the following error trying to init a Grid2Op env with PyPowSyBl2Grid backend with Grid2Op v1.13 and not with earlier versions of it. The error is:
This seems to be linked to changes made in Grid2Op v1.13 associated with changes made in this PR
To reproduce : Try to init a grid2Op env with this backend and Grid2Op v1.13:
Then
With an .xiidm network simply loaded from
PF_STANWAY/2026/01/22/PtFige-20260122-1055-enrichi.arc.xz