geopython / OWSLib

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
https://owslib.readthedocs.io
BSD 3-Clause "New" or "Revised" License
381 stars 273 forks source link

ValueError: invalid literal for int() with base 10: 'false' #64

Closed murdav closed 11 years ago

murdav commented 11 years ago

Dear,

I was doing several tests and I got this error:

wms = WebMapService('http://frameworkwfs.usgs.gov/framework/wms/wms.cgi')

Traceback (most recent call last): File "", line 1, in File "/srv/virtualenvs/fm/local/lib/python2.7/site-packages/owslib/wms.py", line 86, in init self._buildMetadata(parse_remote_metadata) File "/srv/virtualenvs/fm/local/lib/python2.7/site-packages/owslib/wms.py", line 126, in _buildMetadata gather_layers(caps, None) File "/srv/virtualenvs/fm/local/lib/python2.7/site-packages/owslib/wms.py", line 120, in gather_layers cm = ContentMetadata(elem, parent=parent_metadata, index=index+1, parse_remote_metadata=parse_remote_metadata) File "/srv/virtualenvs/fm/local/lib/python2.7/site-packages/owslib/wms.py", line 327, in init self.queryable = int(elem.attrib.get('queryable', 0)) ValueError: invalid literal for int() with base 10: 'false'

OWSLib==0.7.2

Using QGis the service works.

Thanks!

D

tomkralidis commented 11 years ago

FYI the WMS 1.1.1 DTD says queryable should be either 0 or 1 ('true' or 'false' do not count), so this is a bug on the provider's service.

murdav commented 11 years ago

Thanks @tomkralidis! I will forward this to them. I supposed something similar on the provider side.

Checking the service http://frameworkwfs.usgs.gov/framework/wms/wms.cgi using http://suite.opengeo.org/geoexplorer/composer/ GXP crashed, but using Geonode 2.alpha with GXP integrated works, hence I didn't know what to do. Again thanks!