Zverik / Nik4

Mapnik to image export
Do What The F*ck You Want To Public License
123 stars 23 forks source link

Streaming output image to stdout doesn't work #44

Open Luflosi opened 2 years ago

Luflosi commented 2 years ago

Executing nik4.py --fit route --padding 30 --add-layers route,stops --vars route=/path/to/route.json --ppi 100 -a +4 /path/to/osm.xml - outputs the following traceback:

Traceback (most recent call last):
  File "/path/to/nik4.py", line 677, in <module>
    run(options)
  File "/path/to/nik4.py", line 520, in run
    im.save(outfile, fmt)
Boost.Python.ArgumentError: Python argument types in
    Image.save(Image, _io.BufferedRandom, str)
did not match C++ signature:
    save(mapnik::image_any, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, mapnik::rgba_palette)
    save(mapnik::image_any, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
    save(mapnik::image_any, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

While nik4.py --fit route --padding 30 --add-layers route,stops --vars route=/path/to/route.json --ppi 100 -a +4 /path/to/osm.xml /path/to/out.png works fine. Is this a problem with Nik4 or perhaps with the way it or some dependency is packaged? I could try installing it via pip on Arch Linux if you think that this may help. I'm running the latest version 1.7.