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

Method not allowed "ListStoredQueries" #229

Closed frida-161 closed 1 year ago

frida-161 commented 2 years ago

Environment

Description

When using WFS that have a differing URL stated under ows:OperationsMetadata I get the Exception below when trying to connect. The WFS still works but does not show the StoredQueries. When I manually change the URL to the one in OperationsMetadata it works fine.

WFS I used https://www.geoportal.hessen.de/registry/wfs/711?REQUEST=GetCapabilities&VERSION=2.0.0&SERVICE=WFS

Logs

owslib.util.ServiceException: Method not allowed "ListStoredQueries" 
Traceback (most recent call last):
  File "/home/t5n/.local/share/QGIS/QGIS3/profiles/HVBG/python/plugins/gml_application_schema_toolbox/gui/load_wizard_wfs.py", line 165, in on_connectBtn_clicked
    return self.on_connectBtn_clicked_()
  File "/home/t5n/.local/share/QGIS/QGIS3/profiles/HVBG/python/plugins/gml_application_schema_toolbox/gui/load_wizard_wfs.py", line 190, in on_connectBtn_clicked_
    if hasattr(wfs, "storedqueries"):
  File "/usr/lib/python3.10/site-packages/owslib/feature/wfs200.py", line 424, in _getStoredQueries
    u = openURL(
  File "/usr/lib/python3.10/site-packages/owslib/util.py", line 235, in openURL
    raise ServiceException('\n'.join([t.strip() for t in serviceException.itertext() if t.strip()]))
owslib.util.ServiceException: Method not allowed "ListStoredQueries"
frida-161 commented 1 year ago

Hi, Somehow now the thrown Error changed to an lxml.etree.XMLSyntaxError. I think something in the configuration of the WFS may have caused it. Since this doesn't impact the function of the WFS (aside from StoredQueries) I propose that we catch this Error the same way as with the ServiceException.