ID 159752 - "ValueError: not attached to a a node" with python callbacks

Follow


This is split from bug 23376, as it's a slightly different issue.

I can reproduce this back to 5.2v1 - it's not a regression. It was briefly fixed in 6.3v7b36 as part of bug 23376, until the fix was reverted (I believe it was causing other problems, or deemed too dodgy?).



Repro steps, taken from comment 5 of bug 23376:

1) With an otherwise empty .nuke, put the following code in your init.py

###
import nuke

def changeTest():
if nuke.thisNode() != None:
print nuke.thisNode().name()

nuke.addKnobChanged(changeTest)

2) Launch Nuke and then open a script (it can be as simple as just a Blur node)
from either File > Open or File > Recent Files.

"ValueError: not attached to a node" will be printed in your script editor.


If you launch Nuke to open the same script directly e.g.

/usr/local/foundry/Nuke6.3v6/Nuke6.3 -V /tmp/test.nk

then the error will not be printed.
Host(s):

    We're sorry to hear that

    Please tell us why