Unable to run train.py, 'F110Env' object has no attribute 'map_data'
wongm3079 opened this issue · 3 comments
wongm3079 commented
Unable to run train.py
After cloning the repository. and running python3 train.py
. An error shows when creating an environment. The F110Env object does not show to have a map_data attribute.
To Reproduce
Steps to reproduce the behavior:
- Clone the Github repository
- navigate to the work directory
- run the command
python3 train.py
- Observe Issue
Expected Behavior
Successfully create the environment, train the model, and save the model
Desktop:
- OS: Linux Ubuntu 20.04 LTS
- Python Version: 3.8.10
- GPU: NVIDIA 3070 Ti
- NVIDIA Cuda Compiler Version: 10.1, V10.1.243
Additional context
- Changing the device from
cuda
tocpu
intrain.py
has no effect in changing the result - Added a line on Line 64 that saves the model:
model.save("save path")
wongm3079 commented
Closing issue as is related to virtual environment setup. Issue is not reproduced when running outside a virtual environment.
wongm3079 commented
meraccos commented
I believe this issue is related to the newer versions of stable baselines3, which uses gymnasium instead of gym. Try installing stablebaselines3 < v2.0 and run again.