注意:找到了一个临时解决方案:打开camera.py
,使用pass
并对函数_view_plane_normal_changed
中的内容进行注释,然后重新编译它。在
我用的是python(x,y)2.7.5.1
。当我使用像mayavi这样的tvtk的包时,它会引发一个AttributeError:SetViewPlaneNormal.
我知道这是因为vtk不赞成这种方法。
有人知道怎么解决吗?
vtk
的版本是5.10.1-3.
完整的trackback包含如下一些块:
ERROR:traits:Exception occurred in traits notification handler for object: vtkOpenGLCamera (06F89078)
Debug: Off
...#There are too many lines here
Traceback (most recent call last):
File "D:\Python27\lib\site-packages\traits\trait_notifiers.py", line 381, in call_3
self.handler( object, old, new )
File "D:\Python27\lib\site-packages\tvtk\tvtk_classes.zip\tvtk_classes\camera.py", line 82, in _view_plane_normal_changed
self._do_change(self._vtk_obj.SetViewPlaneNormal,
AttributeError: SetViewPlaneNormal
Exception occurred in traits notification handler.
我也面临着同样的问题。任何mayavi代码都会导致
AttributeError:SetViewPlaneNormal
错误。在我的平台是win7prox64,有python2.7.5,vtk5.10.1,Mayavi 4.3.0。在
请注意,即使是官方的python示例也会导致错误,但是尽管在控制台中不断地打印错误,图形还是正确地显示出来的。在
以下是完整的堆栈跟踪:
上面的堆栈跟踪在每次渲染中打印多次。如果我们移动摄像机导致FPS的大幅度下降,就会继续发生。在
导致此错误的最简单代码示例:
^{pr2}$我在使用python(x,y)(2.7.5.2)时也遇到过这个问题,但是在Anaconda(1.8.0)发行版下,代码可以正常工作。在
相关问题 更多 >
编程相关推荐