llimllib / pymag-trees

Code from the article "Drawing Good-looking Trees" in Python Magazine
http://billmill.org/pymag-trees/
Do What The F*ck You Want To Public License
190 stars 33 forks source link

'stroke' not defined #2

Closed bradleybossard closed 10 years ago

bradleybossard commented 10 years ago

Hello, sorry if I missed something obvious, but I get the following error below. I don't see stroke defined in in the repo. Do I need to use IPython or install a certain library? I am using OSX.

python figure1.py Traceback (most recent call last): File "figure1.py", line 3, in from buchheim import buchheim File "/Users/bradleybossard/gitsrc/pymag-trees/buchheim.py", line 163, in stroke(0) NameError: name 'stroke' is not defined

llimllib commented 10 years ago

It's meant to be run inside nodebox, which defines the stroke function. Sorry that wasn't clear.

Arrnas commented 10 years ago

I'm running osx 10.9.3, nodebox 1.9.7 generates NameError: name 'stroke' is not defined while nodebox 1.9.5 crashes when running.

llimllib commented 10 years ago

@Arrnas: not sure what's up. Here's a documentation example showing the use of the stroke function: http://nodebox.net/code/index.php/Paths

Arrnas commented 10 years ago

@llimllib: started working after commenting these lines in buchheim.py: 163 #stroke(0) 178 #size(1000, 500) 179 #translate(2, 2) 180 #stroke(0) 181 #drawconn(dt, 0) 182 #fill(1,1,1) 183 #drawt(dt, 0) not sure what's going on since the same methods work fine in figure7.py and others, but the output is the same as in the examples so i'm assuming that they're not essential.

Yamilquery commented 9 years ago

Gracias, tenía el mismo problema, comentando dichas lineas se soluciono todo. :)

llimllib commented 9 years ago

I'm not maintaining this software any longer, if anybody wants to submit a PR I would gladly accept it.