Skip to content

Commit

Permalink
render_modes compatability with gym>0.17.3 (#2334)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahalev authored Jan 4, 2023
1 parent 3492f44 commit 2d59480
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/garage/envs/gym_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ def __init__(self, env, is_image=False, max_episode_length=None):
self._max_episode_length = _get_time_limit(self._env,
max_episode_length)

self._render_modes = self._env.metadata['render.modes']
try:
self._render_modes = self._env.metadata['render_modes']
except KeyError:
self._render_modes = self._env.metadata['render.modes']

self._step_cnt = None
self._visualize = False
Expand Down

0 comments on commit 2d59480

Please sign in to comment.