Code: env.render(close=True)
Using windows 10 + anaconda + jupyter. Tried gym ver. 0.10.5 and 0.10.3
I believe close is now a top level method, try env.close() instead
I tried env.render(close=True) on OSX and it reported the same error. You should use env.close() instead.
I dont need to close the environment with env.close(). Doing "env.render(close=True)" was allowing before to close the env window with a mouse by pressing on the 'X' icon of the window. Without close=True the windows freezes and you have to restart the kernel to fix it.
env.render() should return a bool indicating that the window is still open. Once this returns false, the caller to env.render() should exit. If this isn't true for some particular environment, a PR would be appreciated. close=True was removed some time ago I believe.
Updating gym works for me.
I used gym version 0.15.4.
Use
pip uninstall gym
pip install gym==0.15.4
Most helpful comment
I dont need to close the environment with env.close(). Doing "env.render(close=True)" was allowing before to close the env window with a mouse by pressing on the 'X' icon of the window. Without close=True the windows freezes and you have to restart the kernel to fix it.