Re: [mapnik] "Could not initialize ICU resources"

285 views
Skip to first unread message

Dane Springmeyer

unread,
Dec 11, 2012, 7:16:28 PM12/11/12
to map...@googlegroups.com
Hi Dan,

This is a bug in the installer build - sorry about that. You are absolutely correct that this impacts the `.replace` or `.match` functionality. The reason for this is that boost_regex is used for match/replace support. Boost regex can optionally be built with unicode support, which this installer was built with. However for the support to work at runtime boost needs to know where the icu.dat file is, and the installer does not support this automatically.

I've created a ticket to remind myself to fix this when I rebuild the installer: https://github.com/mapnik/mapnik/issues/1641

In the meantime doing this in your .profile should fix things:

export ICU_DATA=/Library/Frameworks/Mapnik.framework/unix/share/icu/

Dane


On Dec 11, 2012, at 3:52 PM, danpelota wrote:


Hi all,

I've installed Mapnik 2.1.0 on my OS X 10.6 system using the dmg installer here: http://mapnik.org/download/. I can successfully render simple styles, but from time to time map rendering fails with the following:

"RuntimeError: Could not initialize ICU resources"

I've narrowed the problem a little. If my xml contains a TextSymbolizer such as...

<TextSymbolizer face-name="Arial"><![CDATA[[name]]]> </TextSymbolizer>

...the script runs fine. If, however, I include something like:

<TextSymbolizer face-name="Arial"><![CDATA[[name].replace('a','b')]]> </TextSymbolizer>

...I hit the above error message.

The xml files I usually have problems with are generated by Tilemill (0.10.1), which is installed on the same system. Any help on how to proceed would be much appreciated.

Dan



danpelota

unread,
Dec 12, 2012, 9:39:03 AM12/12/12
to map...@googlegroups.com

Worked perfectly – thank you!

Also, having built mapnik from source on various systems over the last few years, thank you for the work on the installer!

Dan

Dane Springmeyer

unread,
Dec 12, 2012, 1:35:21 PM12/12/12
to map...@googlegroups.com

On Dec 12, 2012, at 6:39 AM, danpelota wrote:
> Worked perfectly – thank you!
>
>

Great, thanks for testing.

> Also, having built mapnik from source on various systems over the last few years, thank you for the work on the installer!
>

Good to hear. Let me know if you run into anything else.

If you want to use custom projection of geotiffs with the installer for now you may also need:

export PROJ_LIB=/Library/Frameworks/Mapnik.framework/unix/share/proj
export GDAL_DATA=/Library/Frameworks/Mapnik.framework/unix/share/gdal

Dane

George T.

unread,
Oct 5, 2019, 9:34:08 AM10/5/19
to mapnik
Hi Dane!
Could you please help with the similar issue:
I've installed Mapnik 3.0.2 on Debian 10 x64 system using the installer from: http://mapnik.org/download/. but map rendering fails with the following:

RuntimeError: Could not initialize ICU resources for expression: "[name].replace('([\S\ ])','$1 ')" in style 'waterway_label' in TextSymbolizer of '/var/lib/postgresql/svn.openstreetmap.org/applications/rendering/mapnik/osm.xml'

Any help on how to proceed will be great
George



12 Dec 2012 г., 4:16:28 UTC+4 пользователь Dane Springmeyer написал:
Reply all
Reply to author
Forward
0 new messages