ID 246536 - Error occurs when assigning a colorspace to a new Read node via Python

Follow

Problem summary
When assigning a colorspace to a new Read node via Python, it errors saying:

# Result: Traceback (most recent call last):
File "<string>", line 4, in <module>
NameError: knob colorspace does not exist
Customer reported version
nuke.10.0v4

Customer reported platform
centos7

Steps to reproduce

1) Open Nuke

2) Read in a .dpx file, one is attached

3) View the Read node

4) Select the Read node and run the below script:
oldNode = nuke.selectedNode()
newNode = nuke.createNode("Read")
newNode['file'].setValue(oldNode['file'].value())
newNode['colorspace'].setValue(oldNode['colorspace'].value())
It will create the Read node, but error saying: 
# Result: Traceback (most recent call last):
File "<string>", line 4, in <module>
NameError: knob colorspace does not exist
The file path will also not be assigned to the new Read node.

Workaround
Not viewing the Read node can help, or running the script a second time seems to work.

Reproduced by support
This problem has been reproduced on:
Nuke 10.0v5 - Windows 10 - CentOS 6.8
Nuke 10.0v1 - Windows 10
Nuke 9.0v9 - Windows 10
Nuke 9.0v1 - Windows 10
Nuke 8.0v6 - Windows 10 - CentOS 6.8

Expected behaviour
For Nuke to assign values to the Read node correctly

Actual behaviour
It errored.

    We're sorry to hear that

    Please tell us why