AttributeError: 'ScaledFloatFrame' object has no attribute 'num_envs'
See original GitHub issueWhen I run: python3 -m baselines.run --alg=ppo2 --env=SuperMarioBros-Nes --num_timesteps=2e7
I get this error:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/fanbingbing/ML/baselines/baselines/run.py", line 239, in <module>
main()
File "/home/fanbingbing/ML/baselines/baselines/run.py", line 213, in main
model, env = train(args, extra_args)
File "/home/fanbingbing/ML/baselines/baselines/run.py", line 79, in train
**alg_kwargs
File "/home/fanbingbing/ML/baselines/baselines/ppo2/ppo2.py", line 295, in learn
nenvs = env.num_envs
AttributeError: 'ScaledFloatFrame' object has no attribute 'num_envs'
I made a temporary fix but get other similar errors further.
Additional info: Ubuntu 18.04 Python 3.6.6 synced baselines with latest commit: 28aca63
retro env works fine with SuperMario when I test it directly so it’s not an issue with retro env not working Also the example command provided in the readme works fine: python3 -m baselines.run --alg=ppo2 --env=PongNoFrameskip-v4 --num_timesteps=2e7
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why am I getting AttributeError: Object has no attribute? [closed]
Your indentation is goofed, and you've mixed tabs and spaces. Run the script with python -tt to verify.
Read more >Why am I getting AttributeError: Object has no attribute?
PYTHON : Why am I getting AttributeError : Object has no attribute ? [ Gift : Animated Search Engine ...
Read more >Python AttributeError — What is it and how do you fix it?
AttributeError : '***' object has no attribute '***'What is an AttributeError in Python? What can you do to fix it? When does it...
Read more >Unit 7. Modifying the learning algorithm: Cartpole error
Hi, I have implemented everything and getting following error at the end. ... AttributeError: 'NoneType' object has no attribute 'shape' ...
Read more >Getting Started With OpenAI Gym: The Basic Building Blocks
We start with an environment called MountainCar , where the objective is to ... If you have an error to the tune of...
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
ok it now works, I added retro defaults for ppo2, make use of the retro deepmind wrapper as well as set ‘cnn’ as default network. I made pull requests
This can be caused by default nsteps being too large. We have the values tuned down for atari games by default, but not retro. You could do that by running with options
--nsteps=128 --nminibatches=4
(first one decreases the number of rollout steps per update, second - number of minibatches those steps are split into)