Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Kartograph test does not work on manual install #26

Closed
futuraprime opened this Issue · 3 comments

4 participants

@futuraprime

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)
simplifying layer_0
layer_0
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
    K.generate(cfg, output)
  File "/Library/Python/2.7/site-packages/kartograph.py-0.1.3-py2.7.egg/kartograph/kartograph.py", line 58, in generate
    svg.preview()
  File "/Library/Python/2.7/site-packages/kartograph.py-0.1.3-py2.7.egg/kartograph/svg.py", line 37, in preview
    call(["firefox", "tmp.svg"])
  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__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

The contents of united-states.yaml are:

layers:
- src: shp/united-states.shp
bounds:
  mode: bbox
  data: [-120,25,-73,50]

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.

@KP
KP commented

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?

@KP
KP commented

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?

@herrstucki

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

@gka gka closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.