Skip to content

Commit 599e47b

Browse files
committed
fix the _CLS_DICT attr
1 parent f1caa87 commit 599e47b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

grid2op/Space/GridObjects.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,6 +2896,10 @@ def _aux_init_grid_from_cls(cls, gridobj, name_res):
28962896

28972897
if f"{module_nm}.{name_res}_file" in sys.modules:
28982898
cls_res = getattr(sys.modules[f"{module_nm}.{name_res}_file"], name_res)
2899+
# do not forget to create the cls_dict once and for all
2900+
if cls_res._CLS_DICT is None:
2901+
tmp = {}
2902+
cls_res._make_cls_dict_extended(cls_res, tmp, as_list=False)
28992903
return cls_res
29002904

29012905
super_module = importlib.import_module(module_nm, super_module_nm) # env/path/_grid2op_classes/

0 commit comments

Comments
 (0)