Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Error with generate_tiles.py #3086

Closed
zsoooc opened this issue Feb 24, 2018 · 10 comments
Closed

Runtime Error with generate_tiles.py #3086

zsoooc opened this issue Feb 24, 2018 · 10 comments

Comments

@zsoooc
Copy link

zsoooc commented Feb 24, 2018

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

@StyXman
Copy link
Contributor

StyXman commented Feb 24, 2018

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.

@SomeoneElseOSM
Copy link
Contributor

SomeoneElseOSM commented Feb 24, 2018

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 renderd is 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).

@StyXman
Copy link
Contributor

StyXman commented Feb 24, 2018

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 StyXman/elevation#1 . I'll try to do it during the weekend.

@kocio-pl
Copy link
Collaborator

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.

@StyXman
Copy link
Contributor

StyXman commented Feb 24, 2018

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.

@kocio-pl
Copy link
Collaborator

Oh, I see. Could you prepare such PR?

@StyXman
Copy link
Contributor

StyXman commented Feb 24, 2018

Sure, probably later or tomorrow.

@Ircama
Copy link
Contributor

Ircama commented Feb 25, 2018

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.

@kocio-pl
Copy link
Collaborator

I think it's effectively closed by #3089.

@pnorman
Copy link
Collaborator

pnorman commented May 25, 2018

Just linking #429 and #2924 for cross-reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants