Closed dniku closed 5 years ago
You should call env.reset()
first, I think that's the only thing missing here.
Uh... a silly mistake, but perhaps the error could be made a little more informative? For example, the state
field could be initialized in __init__
(with None
, probably), and then render
could check whether the environment has been reset.
You should call
env.reset()
first, I think that's the only thing missing here.
I tried calling env.reset()
first. Still got the same error?
env.reset()
gym.make('MountainCar-v0').render('rgb_array')
You should do something like:
import gym
env = gym.make('MountainCar-v0')
env.reset()
env.render('rgb_array')
This is a regression in 0.12.1, as 0.12.0 works fine.