I've run into a similar issue before, try using nuke.nodes instead: 

----- Original Message -----

| From: "Brian Willard" <br...@radarstudios.com>
| To: nuke-python@support.thefoundry.co.uk
| Sent: Monday, September 26, 2016 8:12:49 AM
| Subject: [Nuke-python] reading metadata from exr on disk

| Hello,

| I'm trying to create a read node, read certain metadata, then delete
| the read node. I'm getting a valid result, but also a ValueError in
| readviewscheck.py. Is there a better method I should be using?
| sample code & error below.

| # print metadata from exr on disk
| filePath='/path/to/some.exr'
| readNode = nuke.createNode('Read', inpanel=False)
| readNode['file'].setValue(filePath)
| tc = readNode.metadata('input/timecode')
| print tc
| nuke.delete(readNode)
| ####

| # Result: 16:52:07:01
| Traceback (most recent call last):
| File
| 
"/Applications/Nuke10.0v4/Nuke10.0v4.app/Contents/MacOS/plugins/nukescripts/readviewscheck.py",
| line 98, in <lambda>
| QTimer.singleShot(0, lambda: checkReadNodeViews(read))
| File
| 
"/Applications/Nuke10.0v4/Nuke10.0v4.app/Contents/MacOS/plugins/nukescripts/readviewscheck.py",
| line 68, in checkReadNodeViews
| views = getViews(read)
| File
| 
"/Applications/Nuke10.0v4/Nuke10.0v4.app/Contents/MacOS/plugins/nukescripts/readviewscheck.py",
| line 36, in getViews
| if read['disable'].value():
| ValueError: A PythonObject is not attached to a node

| Regards,
| Brian

| _______________________________________________
| Nuke-python mailing list
| Nuke-python@support.thefoundry.co.uk,
| 
https://urldefense.proofpoint.com/v2/url?u=http-3A__forums.thefoundry.co.uk_&d=DQICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=o8JbPz5XcQhJtkTlSqhBTuhrfSwxJimUu7ljMMuEwqM&s=Bf67jidIVEYqyj0Ie2g5iZEyGArtYt7dSIBpz4HpYh8&e=
| 
https://urldefense.proofpoint.com/v2/url?u=http-3A__support.thefoundry.co.uk_cgi-2Dbin_mailman_listinfo_nuke-2Dpython&d=DQICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=o8JbPz5XcQhJtkTlSqhBTuhrfSwxJimUu7ljMMuEwqM&s=q0C8BDYAeqLXir62DqYMvXeruXOMZMZGMPiQJAuJrIU&e=
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to