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

Prevent extend_enum if pollutant name already exists #130

Closed
stroutm opened this issue Mar 6, 2024 · 3 comments
Closed

Prevent extend_enum if pollutant name already exists #130

stroutm opened this issue Mar 6, 2024 · 3 comments

Comments

@stroutm
Copy link

stroutm commented Mar 6, 2024

This happens if OutputMetadata is instantiated more than once.

If symbolic_name is already present, an error will be thrown.

@stroutm
Copy link
Author

stroutm commented Mar 6, 2024

Opened PR

@bemcdonnell
Copy link
Member

Hey @stroutm! Great to see you in the code. And thanks for sharing your fix! Can you show a little but of the code you were using that threw the error? I looked at the PR for a minute and it's making me think of something else related to this.

@stroutm
Copy link
Author

stroutm commented Mar 6, 2024

I am trying to read from the SWMM out file more than once, in which output_metadata.OutputMetadata(p_handle) is called each time. Doing so results in the following traceback:
traceback_pollut_metadata

@stroutm stroutm closed this as completed Apr 12, 2024
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

No branches or pull requests

2 participants