AsFault
AsFault copied to clipboard
write_scenario_prefab does not create the scenarios folder and this causes a problem
In the function write_scenario_prefab
(in the file beamer.py
) does not create the folder that will contain the scenarios, but this causes a problem when attempting to render the template at the line
prefab = TEMPLATE_ENV.get_template(PREFAB_FILE).render(...)
given that write_scenario_prefab
is called before write_scenario_description
, which, on the other hand, attempts to create the folder scenarios (under the user directory) using
if not os.path.exists(scenarios_dir):
os.makedirs(scenarios_dir)
In the function
write_scenario_prefab
(in the filebeamer.py
) does not create the folder that will contain the scenarios, but this causes a problem when attempting to render the template at the lineprefab = TEMPLATE_ENV.get_template(PREFAB_FILE).render(...)
given that
write_scenario_prefab
is called beforewrite_scenario_description
, which, on the other hand, attempts to create the folder scenarios (under the user directory) usingif not os.path.exists(scenarios_dir): os.makedirs(scenarios_dir)
I met the same problem ,did you solve it? could you give me some advice on it?
@sheepwxy Maybe later I will be pushing a fix to the code. Meanwhile, you can manually create a folder that will contain the scenario. Have a look at how the other scenarios and levels (in BeamNG) are created.
@sheepwxy Maybe later I will be pushing a fix to the code. Meanwhile, you can manually create a folder that will contain the scenario. Have a look at how the other scenarios and levels (in BeamNG) are created.
thanks for your reply!
Maybe the same question. 2019-08-23 15:48:34,774 ERROR [Errno 2] No such file or directory: 'C:\Users\15707\Documents/BeamNG.research\levels/asfault\scenarios\asfault.prefab' Traceback (most recent call last): File "c:\users\15707\asfault\src\asfault\evolver.py", line 334, in run_test execution = runner.run() File "c:\users\15707\asfault\src\asfault\beamer.py", line 825, in run prefab_file = write_scenario_prefab(self.test_dir, self.test) File "c:\users\15707\asfault\src\asfault\beamer.py", line 540, in write_scenario_prefab with open(prefab_file, 'w') as out:
Could you please explain how to fix this error manually?
Many Thanks!
Dear All, sorry for the belated response. We are setting up a new way for installing AsFault and its dependencies. It will be pushed as soon as we test it :D
To solve the error above manually creating a folder named "scenarios" under <BeamNG.research>/levels/asfault should solve it.