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

QGIS: don't crash on unknown layers in database #1265

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Conversation

visr
Copy link
Member

@visr visr commented Mar 14, 2024

Currently both Ribasim Python and the core silently ignore extra unknown tables. This makes QGIS do the same.

An error has occurred while executing Python code: 

KeyError: 'Basin / boundaryconcentration' 
Traceback (most recent call last):
  File "C:\Users/visser_mn/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ribasim_qgis\widgets\dataset_widget.py", line 286, in open_model
    self.load_geopackage()
  File "C:\Users/visser_mn/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ribasim_qgis\widgets\dataset_widget.py", line 221, in load_geopackage
    nodes = load_nodes_from_geopackage(geo_path)
  File "C:\Users/visser_mn/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ribasim_qgis\core\nodes.py", line 870, in load_nodes_from_geopackage
    nodes[layername] = NODES[layername](path)
KeyError: 'Basin / boundaryconcentration'

ribasim_qgis/core/nodes.py Outdated Show resolved Hide resolved
@Hofer-Julian Hofer-Julian merged commit 6bf9312 into main Mar 14, 2024
24 checks passed
@Hofer-Julian Hofer-Julian deleted the qgis-ignore branch March 14, 2024 16:03
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.

3 participants