OWSLib
OWSLib copied to clipboard
WMS - xml to object conversion is None, with valid url
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
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5