And now it works again...
Hard to pinpoit this one.
That's odd. Actually some other people on the forum mentioned another odd thing or two relating to Colors but so far I haven't been able to reproduce them on our machines. Does this error occur only with Colors or in other scripts as well? Is the full script that generates the error?
Very odd. Yep, that's the full script.
Had the 'encounter' again today.
I took the full code, pasted it into a new document, ran it (unsaved) and all was fine.
After restarting nodebox I had the same problem and removed every line with code refering to the Colors lib.
That didn't help. I had to remove the line
colors = ximport("colors")before all ran OK again.
After a restart I experimented further an even better now: After running the code succesfully in the new document it also runs fine in the original troubled document.
It's voodoo but a solution I can live with for now because I LOVE nodebox. Very nice job!
You should try renaming your script. If I'm not mistaken, right now it's name is "colors.py". So when you import the colors library in this file it will first of all search in its own folder and find itself. Then it tries to import itself and weird things happen.
Hope that helps,
Tom
Colors and size
Posted by Edwin on Feb 27, 2008I have trouble with the color library.
gives me;Last night my code worked and this morning I get a
NameError: name 'size' is not defined
I have this a lot. I use a MacBook and 1.9.4 with even the latest color library (1.9.4)