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

Can't complete script if geopackage contains orifices but no universal weirs #174

Open
jaclangemeijer opened this issue Feb 8, 2024 · 2 comments

Comments

@jaclangemeijer
Copy link

The error below (first screenshot) rises for one model area, while the notebooks for other model areas do not encounter the error. Further research shows this occurs in hydrolib.dhydamo.core.drtc.py (second screenshot). As far as I can tell, the problem resides in the fact that our universal weir table is empty. However, it seems impossible then to complete the script if my geopackges contains orifices but no universal weirs, but this is often the case. As long as I am not overlooking anything, my suggestion would be to add 'and not self.hydamo.structures.uweirs_df.empty' to the elif statement of line 164, and possibly something similar tailored for line 168.

image

image

@RuudHurkmans
Copy link
Collaborator

Thank you for the suggestion, I think your analysis is fully correct. We will fix this in a new release according to your suggestion.

@jaclangemeijer
Copy link
Author

jaclangemeijer commented Feb 19, 2024

Thank you for your reply, and the notification that you will take up the issue. I figured I would share my current workaround. It turned out more extensive than I expected to. The attached code snippet replaces the code in the 'if-statement' (149-185), although actual changes start from line 160.
workaround_drtc.txt

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