I had to install Kartograph using the "manual" instructions, as the version of polygon included in the setup.py does not compile on either of my Macs (running 10.7.3 with gcc 4.2). (The latest version on the Polygon github installs properly from its setup.py). Once installed, I tried to run the test script, and hit the following error:
$ kartograph svg united-states.yaml -o states.svg
Proj(laea, lon0=-96.5, lat0=37.5)
Traceback (most recent call last):
File "/usr/local/bin/kartograph", line 8, in <module>
load_entry_point('kartograph.py==0.1.3', 'console_scripts', 'kartograph')()
File "/Library/Python/2.7/site-packages/kartograph.py-0.1.3-py2.7.egg/kartograph/cli.py", line 57, in main
File "/Library/Python/2.7/site-packages/kartograph.py-0.1.3-py2.7.egg/kartograph/kartograph.py", line 58, in generate
File "/Library/Python/2.7/site-packages/kartograph.py-0.1.3-py2.7.egg/kartograph/svg.py", line 37, in preview
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 486, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
OSError: [Errno 2] No such file or directory
The contents of united-states.yaml are:
- src: shp/united-states.shp
The shapefiles are those downloaded from http://data.kartograph.org/united-states.zip.
Since this involves a call to Firefox, I tried upgrading to the latest version of Firefox (11), but it does not appear to've helped.
I have the same issue. See my comment in Issue 12. After installation woes on 10.7, I wonder if the Python implementation has changed slightly?
The reason for this bug was that the options weren't properly parsed. Kartograph always generated a "tmp.svg" (instead of the specified option "-o states.svg" which it then tried to preview with the "firefox" command (which doesn't exist on your system per default). The missing "firefox" command generated the error.
This should be fixed with #29