[MapProxy] MapProxy 1.8.1 error accessing WMTS with kvp

dirk.thalheim at bkg.bund.de dirk.thalheim at bkg.bund.de
Tue Oct 20 07:15:59 PDT 2015


Hello Oliver,

it seems in prior versions it didn't work neither. I just tested Version 1.8.0 and the same error appears. I attached the configuration.

I might have a clue. I think it's connected to the formatting/parsing of the tilematrixset parameter. For WMTS both requests are working:
.../wmts/tile/1.0.0/webatlasde/default/DE_EPSG_25832_ADV/0/0/0.png
.../wmts/tile/1.0.0/webatlasde/default/DE_EPSG_25832_ADV/00/0/0.png

For WMS (
.../service?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&...&tilematrix=0&tilerow=0&tilecol=0 returns an TileOutOfRange-Exception 
.../service?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&...&tilematrix=00&tilerow=0&tilecol=0 returns internal error

When I look into my cache directory after the second WMS request (tilematrix=00) additionally to 0.mbtiles the file 00.mbtiles is created.

We're using MapProxy in offline mode and separately generating the SQLite cache with the mapproxy-seed tool. So I guess the logged error is due to insufficient write permissions for  the server process. 

Anyway, both WMS requests should access the 0.mbtiles file. I think the true reason is that the tilematrixset parameter has to be parsed as integer or at least must be formatted in the same way as the level id in the sqlite filename.

Kind regards,

Dirk

-----Ursprüngliche Nachricht-----
Von: Oliver Tonnhofer [mailto:olt at omniscale.de] 
Gesendet: Dienstag, 20. Oktober 2015 13:54
An: Thalheim, Dirk <dirk.thalheim at bkg.bund.de>
Cc: mapproxy at lists.osgeo.org
Betreff: Re: [MapProxy] MapProxy 1.8.1 error accessing WMTS with kvp

Hi,

can you post your configuration?
Can you also try to downgrade to 1.8.0 (pip install MapProxy==1.8.0) and check if the issue is also present? This would help tracking down the source of the issue.


Regards,
Oliver

-- 
Oliver Tonnhofer  | Omniscale GmbH & Co KG  | http://omniscale.com
OpenStreetMap WMS and tile services         | http://maps.omniscale.com




> On 15.10.2015, at 14:38, dirk.thalheim at bkg.bund.de wrote:
> 
> Dear list,
>  
> this week we upgraded to MapProxy 1.8.1 and it seems there is a bug when calling a WMTS with KVP. An internal error appears as response and the error log shows following:
> Traceback (most recent call last):
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/wsgiapp.py", line 189, in __call__
>     resp = self.handlers[handler_name].handle(req)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/service/ows.py", line 38, in handle
>      return self.services[service].handle(req)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/service/base.py", line 30, in handle
>      return handler(parsed_req)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/service/wmts.py", line 92, in tile
>      tile = tile_layer.render(request, coverage=limited_to, decorate_img=decorate_img)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/service/tile.py", line 308, in render
>      dimensions=dimensions, with_metadata=True)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/cache/tile.py", line 101, in load_tile_coord
>      self.cache.load_tile(tile, with_metadata)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/cache/mbtiles.py", line 314, in load_tile
>      return self._get_level(tile.coord[2]).load_tile(tile, with_metadata=with_metadata)
>    File "/opt/dev/mapproxy/local/lib/python2.7/site-packages/mapproxy/cache/mbtiles.py", line 168, in load_tile
>      zoom_level = ?''', tile.coord)
> OperationalError: no such table: tiles
>  
> I’m pretty sure it worked with MapProxy 1.8.0. The same parameters with the RESTfull WMTS are working with the 1.8.1 version. Here are some example parameters:
> KVP: mapproxy/webatlasde/service?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&layer=webatlasde&style=default&tilematrixset=DE_EPSG_25832_ADV&tilematrix=00&tilerow=0&tilecol=0&format=png
> REST: mapproxy/webatlasde/wmts/tile/1.0.0/webatlasde/default/DE_EPSG_25832_ADV/00/0/0.png
>  
> We’re using a SQLite-DB as Cache. Maybe it’s connected to that because when using an intermediate cache with disable_storage: true (like in the reprojecting tiles/cache example) it’s working and the response contains the requested tile. Is this a (known) bug or did I miss something?
>  
> So far as a workaround we set up a mod_rewrite rule to forward the KVP requests to REST.
>  
> Kind regards,
>  
> Dirk
>  
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: service.yaml
Type: application/octet-stream
Size: 1737 bytes
Desc: service.yaml
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20151020/39866473/attachment.obj>


More information about the MapProxy mailing list