You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2024-03-30 12:57:44,850] mapproxy.source.request - INFO - GET https://otgportal.com.ua/arcgis/rest/services/hark_malodanulivska/Малоданилівська_орто_10000/MapServer/tile/12/1385/2457 - - 0
[2024-03-30 12:57:44,850] mapproxy.source.tile - WARNING - could not retrieve tile: URL not correct (see logs for URL and reason).
It's obviously related to how urllib works with unicode in urls (spoiler: it does not :)).
But when I tried to change the unicode part with quoted, I got another error:
ValueError: unsupported format character 'D' (0x44) at index 67
File "/mnt/c/workspace/geoarchive/testprj/.venv/lib/python3.12/site-packages/mapproxy/client/tile.py", line 81, in substitute
url = self.url_template.substitute(tile_coord, format, self.grid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/c/workspace/geoarchive/testprj/.venv/lib/python3.12/site-packages/mapproxy/client/tile.py", line 81, in substitute
return self.template % data
~~~~~~~~~~~~~~^~~~~~
ValueError: unsupported format character 'D' (0x44) at index 67
return self.template % data
~~~~~~~~~~~~~~^~~~~~
ValueError: unsupported format character 'D' (0x44) at index 67
And this is where I stuck completely.
Are there any known workarounds for this issue?
Expected Behavior
Tiles url with unicode in it should work.
Actual Behavior
Tiles url with unicode does not work.
Your Environment
Version used: latest master branch
Environment name and version (e.g. Python 2.7.5 with mod_wsgi 4.5.9): python3.11
Server type and version: ubuntu
The text was updated successfully, but these errors were encountered:
If you have replace the non-ascii characters in the url with their percent encoded equivalent then I think you will have to escape the percentage characters so they are treated as literal values when string formatting.
Context
I'm trying to setup maproxy to fetch tiles form completely valid url with unicode part in in, but I'm completely stuck.
I set source as following in mapproxy config:
And I get this error:
It's obviously related to how urllib works with unicode in urls (spoiler: it does not :)).
But when I tried to change the unicode part with quoted, I got another error:
And this is where I stuck completely.
Are there any known workarounds for this issue?
Expected Behavior
Tiles url with unicode in it should work.
Actual Behavior
Tiles url with unicode does not work.
Your Environment
The text was updated successfully, but these errors were encountered: