我正在尝试运行一个python脚本来生成图片。但每次运行时,我都会得到以下错误。
File "/usr2/tmp/Krishnamoorthi/case0383/New/Pics_0.py", line 16, in <module>
case_foam.SurfaceArrays = ['meshPhi', 'phi']
File "/cax/sw-cae1/OPENFOAM/LINUX_x86_64/ParaView/ParaView-4.4.0-Qt4-Linux-64bit/lib/paraview-4.4/site-packages/paraview/servermanager.py", line 302, in __setattr__
"to add this attribute.")
AttributeError: Attribute SurfaceArrays does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute.
我检查了py脚本中的第16行,但它们都很完美。
是不是和paraview的bash有关??
发布于 2016-10-02 22:18:16
问题是case_foam
阅读器实例上不存在SurfaceArrays
属性。
尝试在ParaView UI中打开数据数据文件,查看Properties Panel
上显示了哪些属性。还有一些其他属性应该用来选择meshPhi
和Phi
数组来为您的读者读取。
https://stackoverflow.com/questions/39161205
复制相似问题