Skip to content

Commit a1fccd3

Browse files
committed
trying to fix error caused by gymnasium 1.0
1 parent 56e904d commit a1fccd3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

grid2op/gym_compat/gymenv.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ def _aux_step_new(self, gym_action: ActType) -> Tuple[ObsType, float, bool, bool
149149
g2op_obs, reward, terminated, info = self.init_env.step(g2op_act)
150150
gym_obs = self.observation_space.to_gym(g2op_obs)
151151
truncated = False # see https://github.com/openai/gym/pull/2752
152+
if "exception" in info:
153+
info["exception"] = [str(el) for el in info["exception"]]
152154
return gym_obs, float(reward), terminated, truncated, info
153155

154156
def _aux_reset(self,

0 commit comments

Comments
 (0)