[MapProxy] Internal error with GetCapabilities WMS request

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[MapProxy] Internal error with GetCapabilities WMS request

Peter Sykora
Hi,
I could successfully setup mapproxy with the default configuration on my
server, except that I get an error accessing the capabilities document
for WMS:
http://www.carto.net/mapproxy/service?REQUEST=GetCapabilities
I get the following errors:
2019-02-24 21:49:26,036 - CRITICAL - mapproxy.wsgiapp - fatal error in
service for /service?REQUEST=GetCapabilities
Traceback (most recent call last):
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/wsgiapp.py",
line 193, in __call__
     resp = self.handlers[handler_name].handle(req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/ows.py",
line 38, in handle
     return self.services[service].handle(req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/base.py",
line 30, in handle
     return handler(parsed_req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 196, in capabilities
     ).render(map_request)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 516, in render
     return self._render_template(_map_request.capabilities_template)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 531, in _render_template
     inspire_md=inspire_md,
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 167, in substitute
     result, defs, inherit = self._interpret(ns)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 178, in _interpret
     self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 206, in _interpret_codes
     self._interpret_code(item, ns, out, defs)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 226, in _interpret_code
     base = self._eval(parts[0], ns, pos)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 301, in _eval
     reraise((exc_info[0], e, exc_info[2]))
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/py.py",
line 40, in reraise
     raise exc.with_traceback(tb)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 288, in _eval
     value = eval(code, self.default_namespace, ns)
   File "<string>", line 1, in <module>
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 519, in __call__
     values = self._parse_signature(args, kw)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 562, in _parse_signature
     % ', '.join(repr(v) for v in args))
TypeError: Extra position arguments: True at line 169 column 3 in file
/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/templates/wms111capabilities.xml

The GetMap requests work fine, eg.:
http://www.carto.net/mapproxy/service?LAYERS=osm&FORMAT=image%2Fjpeg&SRS=EPSG%3A3857&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-5256910.9372448,-3015410.0118901,11277947.021405,8725317.5327129&WIDTH=845&HEIGHT=600
Thanks in advance for any hints
Peter



_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Internal error with GetCapabilities WMS request

jratike80
Hi,

&SERVICE=WMS is a compulsory parameter in GetCapabilities by the standard, and I would recommend to use the VERSION as well because version negotiation is sort of an odd thing.  MapProxy may be flexible and accept also non-standard requests but it is good practice to do it right. Unfortunately also this returns just "internal error" so there is something odd in your service

http://www.carto.net/mapproxy/service?service=WMS&version=1.1.1&request=GetCapabilities

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: MapProxy <[hidden email]> Puolesta Peter Sykora
Lähetetty: sunnuntai 24. helmikuuta 2019 23.12
Vastaanottaja: [hidden email]
Aihe: [MapProxy] Internal error with GetCapabilities WMS request

Hi,
I could successfully setup mapproxy with the default configuration on my server, except that I get an error accessing the capabilities document for WMS:
http://www.carto.net/mapproxy/service?REQUEST=GetCapabilities
I get the following errors:
2019-02-24 21:49:26,036 - CRITICAL - mapproxy.wsgiapp - fatal error in service for /service?REQUEST=GetCapabilities Traceback (most recent call last):
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/wsgiapp.py",
line 193, in __call__
     resp = self.handlers[handler_name].handle(req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/ows.py",
line 38, in handle
     return self.services[service].handle(req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/base.py",
line 30, in handle
     return handler(parsed_req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 196, in capabilities
     ).render(map_request)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 516, in render
     return self._render_template(_map_request.capabilities_template)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 531, in _render_template
     inspire_md=inspire_md,
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 167, in substitute
     result, defs, inherit = self._interpret(ns)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 178, in _interpret
     self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 206, in _interpret_codes
     self._interpret_code(item, ns, out, defs)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 226, in _interpret_code
     base = self._eval(parts[0], ns, pos)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 301, in _eval
     reraise((exc_info[0], e, exc_info[2]))
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/py.py",
line 40, in reraise
     raise exc.with_traceback(tb)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 288, in _eval
     value = eval(code, self.default_namespace, ns)
   File "<string>", line 1, in <module>
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 519, in __call__
     values = self._parse_signature(args, kw)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 562, in _parse_signature
     % ', '.join(repr(v) for v in args))
TypeError: Extra position arguments: True at line 169 column 3 in file /home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/templates/wms111capabilities.xml

The GetMap requests work fine, eg.:
http://www.carto.net/mapproxy/service?LAYERS=osm&FORMAT=image%2Fjpeg&SRS=EPSG%3A3857&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-5256910.9372448,-3015410.0118901,11277947.021405,8725317.5327129&WIDTH=845&HEIGHT=600
Thanks in advance for any hints
Peter



_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Internal error with GetCapabilities WMS request

Paul Czioska
Hi,

the error seems to be caused by a change in Pythons tokenizer package (Python 3.6.7) when using MapProxy 1.11.0.

There is already a fix available:
https://github.com/mapproxy/mapproxy/commit/81c84d47bbc77da324c36ca718fbca7dde1c1c66

After editing the four files it should work.

Note that obviously the issue occurs not only on Windows but also on Linux machines (in contrast to the heading).

Regards
Paul

-----Alkuperäinen viesti-----
Lähettäjä: MapProxy <[hidden email]> Puolesta Peter Sykora
Lähetetty: sunnuntai 24. helmikuuta 2019 23.12
Vastaanottaja: [hidden email]
Aihe: [MapProxy] Internal error with GetCapabilities WMS request

Hi,
I could successfully setup mapproxy with the default configuration on my server, except that I get an error accessing the capabilities document for WMS:
http://www.carto.net/mapproxy/service?REQUEST=GetCapabilities
I get the following errors:
2019-02-24 21:49:26,036 - CRITICAL - mapproxy.wsgiapp - fatal error in service for /service?REQUEST=GetCapabilities Traceback (most recent call last):
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/wsgiapp.py",
line 193, in __call__
     resp = self.handlers[handler_name].handle(req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/ows.py",
line 38, in handle
     return self.services[service].handle(req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/base.py",
line 30, in handle
     return handler(parsed_req)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 196, in capabilities
     ).render(map_request)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 516, in render
     return self._render_template(_map_request.capabilities_template)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
line 531, in _render_template
     inspire_md=inspire_md,
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 167, in substitute
     result, defs, inherit = self._interpret(ns)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 178, in _interpret
     self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 206, in _interpret_codes
     self._interpret_code(item, ns, out, defs)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 226, in _interpret_code
     base = self._eval(parts[0], ns, pos)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 301, in _eval
     reraise((exc_info[0], e, exc_info[2]))
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/py.py",
line 40, in reraise
     raise exc.with_traceback(tb)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 288, in _eval
     value = eval(code, self.default_namespace, ns)
   File "<string>", line 1, in <module>
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 519, in __call__
     values = self._parse_signature(args, kw)
   File
"/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
line 562, in _parse_signature
     % ', '.join(repr(v) for v in args))
TypeError: Extra position arguments: True at line 169 column 3 in file /home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/templates/wms111capabilities.xml

The GetMap requests work fine, eg.:
http://www.carto.net/mapproxy/service?LAYERS=osm&FORMAT=image%2Fjpeg&SRS=EPSG%3A3857&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-5256910.9372448,-3015410.0118901,11277947.021405,8725317.5327129&WIDTH=845&HEIGHT=600
Thanks in advance for any hints
Peter



_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Internal error with GetCapabilities WMS request

Peter Sykora
Problem solved, thanks a lot for your help Paul!!
Cheers
Peter

Am 25.02.2019 um 08:54 schrieb Paul Czioska:

> Hi,
>
> the error seems to be caused by a change in Pythons tokenizer package (Python 3.6.7) when using MapProxy 1.11.0.
>
> There is already a fix available:
> https://github.com/mapproxy/mapproxy/commit/81c84d47bbc77da324c36ca718fbca7dde1c1c66
>
> After editing the four files it should work.
>
> Note that obviously the issue occurs not only on Windows but also on Linux machines (in contrast to the heading).
>
> Regards
> Paul
>
> -----Alkuperäinen viesti-----
> Lähettäjä: MapProxy <[hidden email]> Puolesta Peter Sykora
> Lähetetty: sunnuntai 24. helmikuuta 2019 23.12
> Vastaanottaja: [hidden email]
> Aihe: [MapProxy] Internal error with GetCapabilities WMS request
>
> Hi,
> I could successfully setup mapproxy with the default configuration on my server, except that I get an error accessing the capabilities document for WMS:
> http://www.carto.net/mapproxy/service?REQUEST=GetCapabilities
> I get the following errors:
> 2019-02-24 21:49:26,036 - CRITICAL - mapproxy.wsgiapp - fatal error in service for /service?REQUEST=GetCapabilities Traceback (most recent call last):
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/wsgiapp.py",
> line 193, in __call__
>       resp = self.handlers[handler_name].handle(req)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/ows.py",
> line 38, in handle
>       return self.services[service].handle(req)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/base.py",
> line 30, in handle
>       return handler(parsed_req)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
> line 196, in capabilities
>       ).render(map_request)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
> line 516, in render
>       return self._render_template(_map_request.capabilities_template)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/wms.py",
> line 531, in _render_template
>       inspire_md=inspire_md,
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 167, in substitute
>       result, defs, inherit = self._interpret(ns)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 178, in _interpret
>       self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 206, in _interpret_codes
>       self._interpret_code(item, ns, out, defs)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 226, in _interpret_code
>       base = self._eval(parts[0], ns, pos)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 301, in _eval
>       reraise((exc_info[0], e, exc_info[2]))
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/py.py",
> line 40, in reraise
>       raise exc.with_traceback(tb)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 288, in _eval
>       value = eval(code, self.default_namespace, ns)
>     File "<string>", line 1, in <module>
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 519, in __call__
>       values = self._parse_signature(args, kw)
>     File
> "/home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/util/ext/tempita/__init__.py",
> line 562, in _parse_signature
>       % ', '.join(repr(v) for v in args))
> TypeError: Extra position arguments: True at line 169 column 3 in file /home/sykora/mapproxy/mapproxy/lib/python3.6/site-packages/mapproxy/service/templates/wms111capabilities.xml
>
> The GetMap requests work fine, eg.:
> http://www.carto.net/mapproxy/service?LAYERS=osm&FORMAT=image%2Fjpeg&SRS=EPSG%3A3857&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-5256910.9372448,-3015410.0118901,11277947.021405,8725317.5327129&WIDTH=845&HEIGHT=600
> Thanks in advance for any hints
> Peter
>
>
>
> _______________________________________________
> MapProxy mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapproxy
> _______________________________________________
> MapProxy mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapproxy


--
______________________________________________________

Peter Sykora
    A-4040 Linz, Fröhlerweg 45
    Festnetz: +43 732 995435
    Mobil: +43 680 2195080
    mailto: [hidden email]

http://www.carto.net/ps/
http://canyon.carto.net/
http://doris.ooe.gv.at/

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy