When running OFF on Windows, the simulation aborts when trying to assign the results directory using the Unix variable 'PWD'. The relevant code is found in off.py:
try:
root_dir = data_dir or f'{os.environ["OFF_PATH"]}/runs/'
lg.info('Root runs directory: ' + root_dir)
except KeyError:
if os.environ["PWD"].endswith("03_Code"):
root_dir = data_dir or f'{os.environ["PWD"][:-len("03_Code")]}/runs/'
else:
root_dir = data_dir or f'{os.environ["PWD"]}/runs/'
Suggested fix:
try:
root_dir = data_dir or f'{os.environ["OFF_PATH"]}/runs/'
lg.info('Root runs directory: ' + root_dir)
except KeyError:
cwd = os.getcwd()
if cwd.endswith("03_Code"):
root_dir = data_dir or f'{cwd[:-len("03_Code")]}/runs/'
else:
root_dir = data_dir or f'{cwd}/runs/'
When running OFF on Windows, the simulation aborts when trying to assign the results directory using the Unix variable 'PWD'. The relevant code is found in off.py:
Suggested fix: