2

I have a working Mapproxy 1.6.0 installation serving several WMS layers. I am now tasked with adding an extra WMS-layer which contain the Danish character Ø.

I have defined the layer in Mapproxy.yaml like this:

layers:
  - name: Other-objects
    title: Other objects
    sources: ['wms_trans:Øvrige_objekter']

When starting Mapproxy it quits immediately with the following information in the log:

2015-03-11 09:42:30,322 - INFO - mapproxy.config - reading: c:\mapproxy\mapproxy.yaml
2015-03-11 09:42:30,338 - WARNING - mapproxy.config - u'wms_trans:\xd8vrige_objekter' in layers[3].sources[0] not of type str
2015-03-11 09:42:30,338 - CRITICAL - mapproxy.config - invalid configuration

The Ø have been translated into \xd8. I have attempted to save mapproxy.yaml with ansi, utf8 and utf8-signature encodings, this does not seem to have an effect.

Since this is an external wms source, it is not possible to rename it. How can I make this work?

1

Two solutions:

  1. fix mapproxy python code and contribute (check utf-8 encoding basics : https://stackoverflow.com/questions/6289474/working-with-utf-8-encoding-in-python-source)

  2. Create a local proxy with Nginx or Apache and rewrite the URI on the fly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.