Git Product home page Git Product logo

Comments (5)

tomkralidis avatar tomkralidis commented on July 27, 2024

Thanks @SaraRT. Looking deeper, MetaSearch uses OWSLib to test whether the WMS/WMTS/WFS/WCS is what it says it is, and this is where the problem happens. It appears that in this WMS's case the Capabilities XML INSPIRE definitions are giving problems to the XML parser. I also verified this using XMLSpy

from metasearch.

rduivenvoorde avatar rduivenvoorde commented on July 27, 2024

@tomkralidis the capabilities are valid xml isn't it? And QGIS is able to load the layers from it if I load it via the normal AddWMS route.
So is what is exactly the problem: the xml is not valid against it's own scheme? Or is it some internals of the OWSLib XML parser throwing up?
In case of the first, can we make OWSLib a litte more forgiving?

from metasearch.

SaraRT avatar SaraRT commented on July 27, 2024

Hi,
we checked our problematic WMS and we noticed that probably in our case the problem is linked to the presence of this tag: "wms_inspire_capabilities" "embed" for the use of multi language options.

from metasearch.

tomkralidis avatar tomkralidis commented on July 27, 2024

@rduivenvoorde: it's being thrown out by OWSLib. As well, the XML is not valid. Here is exactly what is happening in OWSLib:

>>> from owslib.wms import WebMapService
>>> w = WebMapService('http://osgis.csi.it/ws/aera/wms_aera_limiti')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "owslib\wms.py", line 78, in __init__
    self._capabilities = reader.read(self.url)
  File "owslib\wms.py", line 618, in read
    return etree.fromstring(u.read())
  File "C:\Python27\Lib\xml\etree\ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "C:\Python27\Lib\xml\etree\ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "C:\Python27\Lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: unbound prefix: line 123, column 4

Testing in XML Spy yields similar errors. The WMS XML is just problematic.

Having said this, MetaSearch does an OWSLib check to smoke test that the URL is what the metadata says it is by doing a GetCapabilities request and parsing it. It looks like the Add WMS dialogue in QGIS proper is not doing the same amount of checking.

We could lift this checking, but then all responsibility goes to the OWS provider dialogues. Thoughts?

from metasearch.

tomkralidis avatar tomkralidis commented on July 27, 2024

@SaraRT / @LukeGIS this is now fixed in master. Thanks for the feedback.

from metasearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.