NameError: global name 'rad' is not defined in cylindrical projections #12

KP opened this Issue Mar 9, 2012 · 4 comments


None yet
2 participants

KP commented Mar 9, 2012

in kartograph/proj/
on line 114, in init self.phi0 = rad(lat0 * -1)

NameError: global name 'rad' is not defined

I seem to get this error when using the latlon and mercator projections but robinson works just fine.


gka commented Mar 10, 2012

could you confirm whether the bug is still occurring or not using the latest version? it might be fixed now..

KP commented Mar 11, 2012

I'm having a difficult time confirming the fix because something else isn't working. When I try your example I'm getting this:
KPs-MacBook-Pro:kartograph_3_11 KP$ kartograph svg map.yaml -o states.svg
Proj(laea, lon0=-96.5, lat0=37.5)
simplifying layer_0
Traceback (most recent call last):
File "/usr/local/bin/kartograph", line 8, in
load_entry_point('', 'console_scripts', 'kartograph')()
File "/Library/Python/2.7/site-packages/", line 57, in main
K.generate(cfg, output)
File "/Library/Python/2.7/site-packages/", line 58, in generate
File "/Library/Python/2.7/site-packages/", line 37, in preview
call(["firefox", "tmp.svg"])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 486, in call
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 672, in init
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1202, in _execute_child
OSError: [Errno 2] No such file or directory

KP commented Mar 11, 2012

I also installed using on a machine that did not have any of the prior dependencies installed. Looks like it didn't quite work. I do have an installation log I can pass along if that would be helpful for you. Not sure if you want as a separate issue.


gka commented Mar 12, 2012

Yes, let's discuss this in #21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment