evn.render() in doc examples don't run unless n_envs=1 in make_vec_env()
See original GitHub issueThis is possibly quite trivial, but the evn.render()
lines of the code examples do not run for multiprocess environments unless unless n_envs=1
in make_vec_env()
.
For example, the code example on this page
I’m using stable-baselines 2.10.0.
The error is
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/lib/python3.6/site-packages/stable_baselines/common/vec_env/dummy_vec_env.py", line 85, in render
return super().render(*args, **kwargs)
TypeError: render() missing 1 required positional argument: 'mode'
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Environment working, but not render() · Issue #762 · openai/gym
When I run the below code, I can execute steps in the environment ... import gym env = gym.make('CartPole-v0') env.reset() env.render() for ...
Read more >Vectorized Environments - Stable Baselines - Read the Docs
Gym environment rendering. If there are multiple environments then they are tiled together in one image via BaseVecEnv.render() .
Read more >Custom Environments in OpenAI's Gym | Towards Data Science
Beginner's guide on how to set up, verify, and use a custom environment in reinforcement learning training with Python.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Miffyli what version are you using?
The following code works for me (using latest master version):
(it works also with SB3)
Thanks for the amazingly quick resolution!