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

[BUGFIX] Create outputs folder in examples to avoid error when output file does not exist #93

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

misi9170
Copy link
Collaborator

A bug was introduced in #84 that means that the AMRWindStandin examples need to be run twice to work.

The issue is that the

logging.basicConfig(
    level=logging.DEBUG,
    format="%(asctime)s %(name)-12s %(levelname)-8s %(message)s",
    datefmt="%Y-%m-%d %H:%M",
    filename="outputs/log_test_client.log",
    filemode="w",
)
logger = logging.getLogger("amr_wind_standin")

at the top of amr_wind_standin.py assumes that the folder outputs/ already exists; however, it is not created until AMRWindStandin is instantiated.

To resolve the issue, we've added the creation of the outputs folder above this code, as well as added it to emulator.py in case the emulator is run without the AMRWindStandin. Additionally, the .gitignore is updated to ignore an log files beginning with loghercules, logstandin, or logfloris.

@misi9170 misi9170 added the bug Something isn't working label Mar 26, 2024
Copy link
Collaborator

@genevievestarke genevievestarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and runs, I think we can merge it in!

@misi9170 misi9170 merged commit db5e959 into NREL:develop Mar 26, 2024
6 checks passed
@misi9170
Copy link
Collaborator Author

@genevievestarke Done :)

@misi9170 misi9170 deleted the bugfix/outputs-folder branch March 26, 2024 20:40
@misi9170 misi9170 mentioned this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants