OWSLib icon indicating copy to clipboard operation
OWSLib copied to clipboard

WMTS connection error

Open yukexie opened this issue 6 years ago • 1 comments

I am using this library to access WMTS, which format is "application/x-protobuf;type=mapbox-vector"

from owslib.wmts import WebMapTileService the vector tile links VectorTile = 'http://openapi-dev.aurin.org.au/public/gwc/service/wmts' wmts = WebMapTileService(VectorTile) tile = wmts.gettile(layer='aurin:SA1_2016_AUST',tilematrixset ='EPSG:900913', tilematrix = 'EPSG:900913:4',row= 15,column = 8,format = 'application/x-protobuf;type=mapbox-vector')

after running the code above it throw connection error:


gaierror Traceback (most recent call last) D:\software\Anaconda\lib\site-packages\urllib3\connection.py in _new_conn(self) 140 conn = connection.create_connection( --> 141 (self.host, self.port), self.timeout, **extra_kw) 142

D:\software\Anaconda\lib\site-packages\urllib3\util\connection.py in create_connection(address, >timeout, source_address, socket_options) 59 ---> 60 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 61 af, socktype, proto, canonname, sa = res

D:\software\Anaconda\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags) 744 addrlist = [] --> 745 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 746 af, socktype, proto, canonname, sa = res

gaierror: [Errno 11001] getaddrinfo failed

is that because the WMTS server not supported? or any other reason? and also the exceptions:

ConnectionError: HTTPConnectionPool(host='oag-1-geocache', port=8080): Max retries exceeded with url: /geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=aurin%3ASA1_2016_AUST&STYLE=None&TILEMATRIXSET=EPSG%3A900913&TILEMATRIX=EPSG%3A900913%3A4&TILEROW=15&TILECOL=8&FORMAT=application%2Fx-protobuf%3Btype%3Dmapbox-vector (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000023076DB9E80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

yukexie avatar Aug 27 '18 12:08 yukexie

Hi @yukexie,

The error is getaddrinfo failed. That has nothing to do with OWSLib. There is a problem with the service address. The error is related with some Geoserver server (/geoserver/gwc/service/wmts). It is not related with VectorTile = 'http://openapi-dev.aurin.org.au/public/gwc/service/wmts'.

I think this issue can be closed.

jgrocha avatar Nov 21 '19 22:11 jgrocha