Problem summary
Using an expression in the Root node gives a ValueError: A PythonObject is not attached to a nodein the terminal for each Read node in the script.
Customer reported version
Nuke 10.0v3
Customer reported platform
Windows 10
Steps to reproduce
1) Open Nuke and create a Read node
2) Go to Project Settings and click "Script Directory" to set an expression for the project directory
3) Save and close the script.
4) Reopen the script. In the terminal and the script editor there will be the following traceback:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:/Program Files/Nuke10.0v3/plugins\nuke\utils.py", line 13, in script_directory
scriptFilePath = nuke.root().knob("name").value()
ValueError: A PythonObject is not attached to a node
This happens in Nuke 10.0v1 upward. To reproduce in earlier versions, add an OCIOColorSpace node after the Read node, save the script and read it back. The errors should appear in terminal.
Expected behaviour
The expression should evaluate correctly on loading the script and no errors should appear
Actual behaviour
Using the expression gives an error for every Read node