Not Matching C++ signature

121 views
Skip to first unread message

Alessandro Candini

unread,
May 15, 2013, 11:25:27 AM5/15/13
to map...@googlegroups.com
I'm using Mapnik 2.1 and I would like to generate my own slippy map with
generate_tiles.

But when I launch render_tiles function I get the following:

File
"/home/meeo/CanetaRepo/tmp/lta_arch/lta_proj/lta/generate_tiles.py",
line 136, in render_tiles
renderer = RenderThread(tile_dir, mapfile, queue, printLock, maxZoom)
File
"/home/meeo/CanetaRepo/tmp/lta_arch/lta_proj/lta/generate_tiles.py",
line 64, in __init__
mapnik.load_map(self.m, mapfile, True)
ArgumentError: Python argument types in
mapnik._mapnik.load_map(Map, unicode, bool)
did not match C++ signature:
load_map(mapnik::Map {lvalue}, std::string)
load_map(mapnik::Map {lvalue}, std::string, bool)

What does this mean?

Thanks in advance

Artem Pavlenko

unread,
May 15, 2013, 11:36:53 AM5/15/13
to map...@googlegroups.com
You need to convert unicode into ascii string for the second argument :

```python
load_map(<your-map-object>, str(<path-to-map.xml>))
```
Artem
> --
> You received this message because you are subscribed to the Google Groups
> "mapnik" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mapnik+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Alessandro Candini

unread,
May 16, 2013, 4:00:55 AM5/16/13
to map...@googlegroups.com
That worked, thank you so much!!
--
Alessandro Candini
MEEO S.r.l.
Via Saragat 9
I-44122 Ferrara, Italy
Tel: +39 0532 1861501
Fax: +39 0532 1861637
http://www.meeo.it

========================================
"ATTENZIONE:le informazioni contenute in questo messaggio sono
da considerarsi confidenziali ed il loro utilizzo � riservato unicamente
al destinatario sopra indicato. Chi dovesse ricevere questo messaggio
per errore � tenuto ad informare il mittente ed a rimuoverlo
definitivamente da ogni supporto elettronico o cartaceo."

"WARNING:This message contains confidential and/or proprietary
information which may be subject to privilege or immunity and which
is intended for use of its addressee only. Should you receive this
message in error, you are kindly requested to inform the sender and
to definitively remove it from any paper or electronic format."

Reply all
Reply to author
Forward
0 new messages