-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using env.render() along with stable-baselines3 #8
Comments
its didnt work for me, still this error |
to solve this recorder.py
env.py
also delete pycache folder in crafter and gym |
Thanks! I'll leave this open in case it's helpful for other people. I don't know if updating the env is worth it at this point since OpenAI seems to have already changed the Gym interface in the meantime. |
The changed code provided here works well with latest sb3 and latest gym. What about merging the PR #25 ? |
Hello,
In the
gym.Env
class, the first argument is defined as the mode, which is either "human" or "rgb_array". In Crafter, the render function takes only one argument,size
. This causes errors when using stable-baselines3 to evaluate policies and create videos since their helper functions assume envs followgym.Env
and have the first argument as the mode.A fix would be to just add a dummy first argument
mode
to the render functioncrafter/crafter/env.py
Lines 120 to 122 in e955b11
The text was updated successfully, but these errors were encountered: