这段代码运行良好
allWriteNodes=nuke.allNodes("Write")
test = nuke.allNodes()
for index,each in enumerate(test):
wrtNodelst.insert(index,each.name())
print index, each.name()
sys.stdout.write(pickle.dumps(wrtNodelst))
quit()
except RuntimeError:
sys.stderr.write('could not find %s\n' % target_file)
raise
但是要在不同文件中读取的这一行会导致错误:
print pickle.loads(process.stdout.read())
给出 IndexError : list index out of range ... 知道是什么原因导致它读取腌制的标准输出数据吗? 回溯错误
Traceback (most recent call last):
File "\RenderUI.py", line 384, in execApp
print pickle.loads(process.stdout.read())
File "D:\Python26\lib\pickle.py", line 1374, in loads
return Unpickler(file).load()
File "D:\Python26\lib\pickle.py", line 858, in load
dispatch[key](self)
File "D:\Python26\lib\pickle.py", line 1203, in load_setitems
mark = self.marker()
File "D:\Python26\lib\pickle.py", line 874, in marker
while stack[k] is not mark: k = k-1
IndexError: list index out of range