BRGM / gml_application_schema_toolbox

GML Application Schema toolbox is a QGIS plugin allowing to manipulate OGC Complex Features
https://brgm.github.io/gml_application_schema_toolbox/
GNU General Public License v2.0
26 stars 17 forks source link

Error: Database Selection in GMLAS Wizard not working #237

Open frida-161 opened 1 year ago

frida-161 commented 1 year ago

Environment

Description

When trying to load a WFS in GMLAS mode the Database Selection in the Wizard is not working.

spatialite

When selecting a spatialite connection and selecting finish in the Dialog the Dialog just stops. I think this is because of a broken if condition in the ImportGmlasPanel.do_load() function. The last else just returns, if none database formats match. My proposed solution would be to default to a temporary spatialite db (same with no connection selected)

postgres

When selection a postgres connection I the Error shown below:

Traceback (most recent call last):
  File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\HVBG/python/plugins\gml_application_schema_toolbox\gui\load_wizard.py", line 202, in validatePage
    self._panel.do_load()
  File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\HVBG/python/plugins\gml_application_schema_toolbox\gui\import_gmlas_panel.py", line 407, in do_load
    import_in_qgis(
  File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\HVBG/python/plugins\gml_application_schema_toolbox\core\load_gmlas_in_qgis.py", line 124, in import_in_qgis
    conn = md.createConnection(gmlas_uri, {})
AttributeError: 'NoneType' object has no attribute 'createConnection'
frida-161 commented 1 year ago

PR #238 fixes the issue with spatialite. I didn't manage to find a solution for the postgres error.