Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for a rel csv file given in relative path #237

Merged
merged 4 commits into from
Sep 11, 2024
Merged

Conversation

sungeunbae
Copy link
Member

When you run realisation_to_srf.py from the path where the rel csv file is located and give a relative path (ie. just the file name), it will get confused when it sees mkdir because os.path.dirname(rel_csv) is an empty string.

Traceback (most recent call last):
...
  File "/home/seb56/Pre-processing/srf_generation/input_file_generation/realisation_to_srf.py", line 88, in create_stoch
    os.makedirs(out_dir, exist_ok=True)
  File "/home/seb56/miniforge3/envs/mamba310/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

or

Traceback (most recent call last):
...
File "/home/seb56/Pre-processing/srf_generation/input_file_generation/realisation_to_srf.py", line 1016, in generate_sim_params_yaml
os.makedirs(os.path.dirname(sim_params_file), exist_ok=True)
File "/home/seb56/miniforge3/envs/mamba310/lib/python3.10/os.py", line 225, in makedirs
mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

@sungeunbae
Copy link
Member Author

This also include a fix for Jenkins caused by the change to qcore data download

@sungeunbae sungeunbae merged commit a512a18 into master Sep 11, 2024
1 check passed
@sungeunbae sungeunbae deleted the path_bugfix branch September 11, 2024 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants