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

Open
KP opened this Issue Mar 9, 2012 · 4 comments

Comments

Projects
None yet
2 participants

KP commented Mar 9, 2012

in kartograph/proj/cylindrical.py
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.

Owner

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
layer_0
Traceback (most recent call last):
File "/usr/local/bin/kartograph", line 8, in
load_entry_point('kartograph.py==0.1.2', 'console_scripts', 'kartograph')()
File "/Library/Python/2.7/site-packages/kartograph.py-0.1.2-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.2-py2.7.egg/kartograph/kartograph.py", line 58, in generate
svg.preview()
File "/Library/Python/2.7/site-packages/kartograph.py-0.1.2-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
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

KP commented Mar 11, 2012

I also installed using setup.py 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 setup.py as a separate issue.

Owner

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