[Solved] font error when using mapnik generate_tiles.py

nomadicME Asks: font error when using mapnik generate_tiles.py
generate_tiles.py has worked fine throughout the transition from mapnik 0.7 to mapnik 2.x in gentoo linux. Now I have switched to debian (wheezy) and I am getting the following error when I run generate_tiles.py:

Code:
RuntimeError: Failed to find font face 'unifont Medium' in FontSet 'book-fonts' in map '.../osm.xml'

If I comment out the book-fonts section in fontset-settings.xml.inc, I get:

Code:
RuntimeError: Failed to find font face 'unifont Medium' in FontSet 'bold-fonts' in map '.../osm.xml'

However, using tilelite creates the tiles just fine.

Code:
$ ls `python -c "import mapnik2;print mapnik2.fontscollectionpath"`
total 9048
drwxr-xr-x  2 root root   4096 2014-10-11 09:10 .
drwxr-xr-x 13 root root   4096 2014-10-11 20:48 ..
-rw-r--r--  1 root root 611212 2011-02-27 07:37 DejaVuSans-BoldOblique.ttf
-rw-r--r--  1 root root 672300 2011-02-27 07:37 DejaVuSans-Bold.ttf
-rw-r--r--  1 root root 580168 2011-02-27 07:37 DejaVuSansCondensed-BoldOblique.ttf
-rw-r--r--  1 root root 631992 2011-02-27 07:37 DejaVuSansCondensed-Bold.ttf
-rw-r--r--  1 root root 576004 2011-02-27 07:37 DejaVuSansCondensed-Oblique.ttf
-rw-r--r--  1 root root 643852 2011-02-27 07:37 DejaVuSansCondensed.ttf
-rw-r--r--  1 root root 345204 2011-02-27 07:37 DejaVuSans-ExtraLight.ttf
-rw-r--r--  1 root root 235848 2011-02-27 07:37 DejaVuSansMono-BoldOblique.ttf
-rw-r--r--  1 root root 313856 2011-02-27 07:37 DejaVuSansMono-Bold.ttf
-rw-r--r--  1 root root 241972 2011-02-27 07:37 DejaVuSansMono-Oblique.ttf
-rw-r--r--  1 root root 333636 2011-02-27 07:37 DejaVuSansMono.ttf
-rw-r--r--  1 root root 611556 2011-02-27 07:37 DejaVuSans-Oblique.ttf
-rw-r--r--  1 root root 720012 2011-02-27 07:37 DejaVuSans.ttf
-rw-r--r--  1 root root 332036 2011-02-27 07:37 DejaVuSerif-BoldItalic.ttf
-rw-r--r--  1 root root 341072 2011-02-27 07:37 DejaVuSerif-Bold.ttf
-rw-r--r--  1 root root 331128 2011-02-27 07:37 DejaVuSerifCondensed-BoldItalic.ttf
-rw-r--r--  1 root root 316440 2011-02-27 07:37 DejaVuSerifCondensed-Bold.ttf
-rw-r--r--  1 root root 338140 2011-02-27 07:37 DejaVuSerifCondensed-Italic.ttf
-rw-r--r--  1 root root 330012 2011-02-27 07:37 DejaVuSerifCondensed.ttf
-rw-r--r--  1 root root 338776 2011-02-27 07:37 DejaVuSerif-Italic.ttf
-rw-r--r--  1 root root 363200 2011-02-27 07:37 DejaVuSerif.ttf

No book font, but there are bold fonts.

These are all the dejavu fonts installed (with their version numbers):

Code:
ttf-dejavu                                          2.33-3   
ttf-dejavu-core                                     2.33-3    
ttf-dejavu-extra                                    2.33-3

I’ve seen a few people having this problem around the web, but no solutions offered.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.