-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Reset error in deadly corridor: screen buffer #543
Comments
Hi @MetallicaSPA! I may need some help to fully understand what is happening. If you mean that from time to time, you get None from Also, we now provide official wrappers for Gym and Gymnasium, so you don't need to implement them yourself! Check https://github.com/Farama-Foundation/ViZDoom/tree/master/examples/python directory for Gym, Gymnasium and StableBaselines examples. |
That's what it seems to happen, because I tried and it happens at different steps; so I feel it's something random.
|
How often does it happen? I'm running your code using Stable-Baselines3 2.0.0a5 alpha (one with Gymnasium support), installed in the following way:
and I don't see any problem with the reset method after 200k timesteps. I'm afraid I will need more details to help you. Details about your environment, and detailed instructions on how to reproduce the problem (and how it occurs). |
It happens every time I ran that enviroment, usually before 50k steps. Never happened with basic or defend the center. I'm running everything in Linux Mint 21.1 Vera, under Anaconda using Spyder IDE. Let me know if you need any more information about my enviroment. EDIT: Updated Gymnasium to 0.28.1, still getting the same problem. File ~/anaconda3/lib/python3.9/site-packages/spyder_kernels/py3compat.py:356 in compat_exec File ~/TFM/Doom_RL/vizdoom_A2C.py:248 File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/a2c/a2c.py:194 in learn File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/common/on_policy_algorithm.py:259 in learn File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/common/on_policy_algorithm.py:178 in collect_rollouts File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/common/vec_env/base_vec_env.py:171 in step File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/common/vec_env/vec_transpose.py:95 in step_wait File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/common/vec_env/dummy_vec_env.py:69 in step_wait File ~/anaconda3/lib/python3.9/site-packages/stable_baselines3/common/monitor.py:83 in reset File ~/TFM/Doom_RL/vizdoom_A2C.py:208 in reset AttributeError: 'NoneType' object has no attribute 'screen_buffer' |
@MetallicaSPA, I replicated your environment and ran a slightly modified script (I attached the modified version below). I've just changed paths to config/log/model files. After 3mln of timesteps, no error. Checked deathmatch and deadly corridor environments. So at the moment, I think the reason might be that your
|
Thanks for this! I modified my |
Happy that we've figured this out! :) |
Hello, I'm following this tutorial: https://www.youtube.com/watch?v=eBCU-tqLGfQ. I'm using stable baselines, wrapping the enviroment for gymnasium, and randomly it gives me the error: 'NoneType' object has no attribute 'screen_buffer', pointing to my reset function, which is:
So the game should be reset. I tried with the basic.wad and defend_the_center.wad and nothing happened. What could be the issue? Any ideas? Thanks in advance.
The text was updated successfully, but these errors were encountered: