Closed simonbogh closed 2 years ago
Hi @simonbogh
Now, OpenAI Gym examples use the following code to ensure compatibility between versions
try:
env = gym.make("Pendulum-v1")
except gym.error.DeprecatedEnv as e:
env_id = [spec.id for spec in gym.envs.registry.all() if spec.id.startswith("Pendulum-v")][0]
print("Pendulum-v1 not found. Trying {}".format(env_id))
env = gym.make(env_id)
Running the first OpenAI
Pendulum-v0
example from the documentation gives a deprecation error. https://skrl.readthedocs.io/en/latest/intro/examples.htmlError
gym.error.DeprecatedEnv: Env Pendulum-v0 not found (valid versions include ['Pendulum-v1'])
It looks like it has been renamed to
Pendulum-v1
in gymv0.21.0
. https://github.com/openai/gym/commit/d199778b9eb06c1370af65a1326238de2ab36746#diff-4fc33321bcd3c321db321c28fee8b7ae2b0101d0e24c2d5d4d911ae647061110Workaround for now, change to
Pendulum-v1
in line 49 of the example:env = gym.make("Pendulum-v0")
if gym v0.21.0 or later.Tested on: