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

File path handeling problems when exporting TSL ace files #3170

Open
janmalec opened this issue Oct 16, 2024 · 2 comments · May be fixed by #3171
Open

File path handeling problems when exporting TSL ace files #3170

janmalec opened this issue Oct 16, 2024 · 2 comments · May be fixed by #3171
Labels

Comments

@janmalec
Copy link
Contributor

Bug Description

When using openmc.data.ThermalScattering.from_njoy(), the ACE file is written to a temporary output_dir, but the function attempts to read it from the current working directory, causing a FileNotFoundError.

I have already developed a fix and will be proposing a pull request later today.

Steps to Reproduce

  1. Call openmc.data.ThermalScattering.from_njoy() with the ace parameter set to a filename (e.g., HinH2O.ace).
  2. Observe that the function writes the ACE file to a temporary output_dir but tries to read it from the current working directory.
  3. A FileNotFoundError is raised because the ACE file doesn't exist at the expected location.

Environment

OS: Ubuntu 24.04.1 LTS \n \l
OpenMC: develop branch, compiled and installed from source. openmc.__version__ reports 0.15.1.dev0

@janmalec janmalec added the Bugs label Oct 16, 2024
@paulromano
Copy link
Contributor

Thanks for reporting @janmalec. I'll keep an eye out for the PR and we should be able to get it merged quickly.

@janmalec
Copy link
Contributor Author

janmalec commented Oct 17, 2024

Upon further testing I found out another issue that happens when the ace file is put in a subfolder. The issue also appears with the original OpenMC code. I'll fix that too before pushing.

edit: I think it should be ok. I cannot reproduce any issue right now.

@janmalec janmalec linked a pull request Oct 17, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants