OWSLib icon indicating copy to clipboard operation
OWSLib copied to clipboard

WMS - xml to object conversion is None, with valid url

Open Leanderson-Coelho opened this issue 5 years ago • 0 comments

Describe the bug

When traversing the xml tags, the WebMapService_1_1_1 /owslib/map/wms111.py object's constructor cannot get the xml information, because for some strange reason the tags are pre-informed even before their name, as in Screenshot 1:

Tag: ContactOrganization
real value: {http://www.opengis.net/wms}ContactOrganization  

in xml: Screenshot 2

To Reproduce

URL used: http://datageo.ambiente.sp.gov.br/serviceTranslator/rest/getXml/IPT_Geoserver_WMS/Risco_Louveira/1449249453587/wms

from owslib.wms import WebMapService

wms = WebMapService('URL used')

Exception thrown: Screenshot 3

This is because a tag with the name 'Service' was not found on line 95 of Screenshot 4. Soon it was sending None to method 'ServiceIdentification' line 96, which obviously does not have the method 'find ()' since it is a None.

Throwing the exception at line 358 Screenshot 5 because the object is None.

Context OWSLib Version [latest on Dec 30, 2019]

Screenshots or Logfiles

Screenshot 1 image

Screenshot 2 image

Screenshot 3 exception

Screenshot 4 image

Screenshot 5 image

Leanderson-Coelho avatar Jan 02 '20 18:01 Leanderson-Coelho