Openstreetmap-carto: Runtime Error with generate_tiles.py

Created on 24 Feb 2018  路  10Comments  路  Source: gravitystorm/openstreetmap-carto

I installed a tile server based on this tutorial: https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/
I strictly followed the instructions and I use Ubuntu 16.04.1 clean install.
The server works, but there is an error when I want to run generate_tiles.py.

"Runtime Error: Failed to find font face 'unifont Medium' in FontSet 'fontset-0' in FontSet at line 17 of '/home/user/src/openstreetmap-carto/style.xml

code

Most helpful comment

Just now @Ircama sent me how to fix this problem. See StyXman/elevation#1 . I'll try to do it during the weekend.

I have just checked and that problem is now fixed with your generate_tiles.py version, thanks.

All 10 comments

I have the same problem under Debian Sid. I just remove that font name, as it's just another, probably older, name for "Unifont Medium". I have no idea in which context that name is still valid.

I have to add that this only breaks when using mapnik with Python as generate_tiles.py does. Old tilemill and new komstik must be configuring mapnik somehow so it only generates a warning. I never took the time to investigate more deeply.

To echo what @StyXman said, both "unifont Medium" and "Unifont Medium" are valid in different Linux distributions. That's not normally a problem, because if something like renderdis using the style, it doesn't mind references to fonts that aren't installed locally. Unfortunately, generate_tiles.py does object.

When using it I tend to remove styles that are obvious duplicates (like "Unifont Medium" here) and add any new ones I might want to install (e.g. for language families such as Burmese that I might want to see displayed on a map, but wouldn't normally be installed by default).

I think I have mentioned this before. I have hacked generate_tiles.py quite a bit. You can see all the options I added here:

https://github.com/StyXman/elevation/blob/master/generate_tiles.py#L673

Just now @Ircama sent me how to fix this problem. See https://github.com/StyXman/elevation/issues/1 . I'll try to do it during the weekend.

This issue is not really related to this style, I guess this is external issue, probably old (XML) OSM.org stylesheet:

https://github.com/openstreetmap/mapnik-stylesheets

Therefore we should probably close this issue.

No, the issue happens because this style works only if mapnik is configured not to be strict. I think with properly stating that in the README should be enough.

Oh, I see. Could you prepare such PR?

Sure, probably later or tomorrow.

Just now @Ircama sent me how to fix this problem. See StyXman/elevation#1 . I'll try to do it during the weekend.

I have just checked and that problem is now fixed with your generate_tiles.py version, thanks.

I think it's effectively closed by #3089.

Just linking #429 and #2924 for cross-reference

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boothym picture boothym  路  5Comments

matkoniecz picture matkoniecz  路  5Comments

dktue picture dktue  路  3Comments

kocio-pl picture kocio-pl  路  4Comments

Vort picture Vort  路  3Comments