edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
942 stars 69 forks source link

AssertionError: incorrect file suffix for fileman when trying to run sb3 ball chase on windows 11 #49

Closed jruots closed 1 year ago

jruots commented 1 year ago

What happened: AssertionError when trying to run train.py file which is copy pasted from: https://github.com/edbeeching/godot_rl_agents/blob/main/examples/stable_baselines3_example.py See error below.

Steps:

Troubleshooting: Tried googling and found zero results

Other info:

Traceback (most recent call last): File "C:\Users\xxxx\Documents\Python Workspace\godot-rl-test\train.py", line 8, in env = StableBaselinesGodotEnv(env_path="C:/Users/xxxx/examples/godot_rl_BallChase/bin/BallChase.x86_64", show_window=True, speedup=8) File "C:\Users\xxxx\anaconda3\envs\godot_rlearning\lib\site-packages\godot_rl\wrappers\stable_baselines_wrapper.py", line 12, in init self.env = GodotEnv(env_path=env_path, **kwargs) File "C:\Users\xxxx\anaconda3\envs\godot_rlearning\lib\site-packages\godot_rl\core\godot_env.py", line 35, in init self.check_platform(env_path) File "C:\Users\xxxx\anaconda3\envs\godot_rlearning\lib\site-packages\godot_rl\core\godot_env.py", line 60, in check_platform pathlib.Path(filename).suffix == ".exe" AssertionError: incorrect file suffix for fileman C:/Users/xxxx/examples/godot_rl_BallChase/bin/BallChase.x86_64 suffix .x86_64

jruots commented 1 year ago

Found the issue. In https://github.com/edbeeching/godot_rl_agents/blob/main/examples/stable_baselines3_example.py For windows you need to change the extension from .x86_64 to .exe as I'm guessing .x86_64 is some Linux thing

edbeeching commented 1 year ago

Thanks, yes you will need to change it to be a .exe extension. I will try to check and do this automatically in the future. Let me know if you have any other issues.