1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

_ctx error

Posted by Crosius on May 14, 2007

I have just encountered a strange error.
Running the following code:

points = [(100,100),(150,178),(240,300)]

autoclosepath(False)
b_path = findpath(points,curvature=0.5)
drawpath(b_path)

Generates the following error:

Traceback (most recent call last):
File "/Applications/NodeBox/NodeBox.app/Contents/Resources/NodeBox.py", line 338, in _execScript
File "", line 5, in ?
File "DrawingPrimitives.pyc", line 1303, in findpath
File "/Users/Steve/Library/Application Support/NodeBox/bezier.py", line 395, in findpath
NameError: global name '_ctx' is not defined

Any ideas what is going on? The program was working fine until just this morning.


 
Posted by Tom De Smedt on May 14, 2007

Hi Crosius,

The latest NodeBox release has fast, built-in support for findpath() and path.point() etc. You no longer need to put an external library (bezier.py) in Application Support. Now you have two definitions of findpath(), on inside the core of Nodebox and one in Application Support, so NodeBox doesn't know which one to choose.

Hope that helps!



Posted by Crosius on May 14, 2007

Perfect! Thanks.

I deleted the bezier folder from Application Support an the error dissappeared.