Hello, I'm new to Mapnik-Users, and I have what might be a naive question about 
the Python bindings layer.

Intermittently I get an error of the type:


Python argument types in
    Color.__init__(Color, unicode)
did not match C++ signature:
    __init__(_object*, std::string)
    __init__(_object*, int, int, int)
    __init__(_object*, int, int, int, int)
Request Method:GET 
Request URL:
 
Exception Type:ArgumentError 
Exception Value:Python argument types in
    Color.__init__(Color, unicode)
did not match C++ signature:
    __init__(_object*, std::string)
    __init__(_object*, int, int, int)
    __init__(_object*, int, int, int, int) 
These occur when I pass a Python string that contains Unicode into the 
Python-Mapnik bindings, as:

colordef = u'#FFFF00'
color = mapnik.Color(colordef) 

I've been able to work around this on a case-by-case basis by wrapping the 
Unicode strings in the string converter function:

colordef = u'#FFFF00'
color = mapnik.Color(str(colordef))

My question is, why isn't this conversion handled in the Python bindings layer 
automatically?

Eric France
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to