Trimesh 显示方法 returns AttributeError
Trimesh show method returns AttributeError
我正在使用 Python trimesh 库来操作和分析三角形网格。
调用 show()
方法 returns 一个 AttributeError :
import trimesh
mesh = trimesh.load_mesh("myfile.stl")
mesh.show()
Traceback (most recent call last):
File "/Users/cg/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-5-cbb52bec63cc>", line 1, in <module>
mesh.show()
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/base.py", line 1339, in show
scene.show(**kwargs)
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/scene.py", line 383, in show
viewer()
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/scene.py", line 380, in viewer
SceneViewer(self, **kwargs)
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/viewer.py", line 31, in __init__
self.reset_view(flags=flags)
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/viewer.py", line 125, in reset_view
if (self.width is not None and
File "/Users/cg/anaconda/lib/python2.7/site-packages/pyglet/window/__init__.py", line 850, in <lambda>
width = property(lambda self: self.get_size()[0],
File "/Users/cg/anaconda/lib/python2.7/site-packages/pyglet/window/cocoa/__init__.py", line 398, in get_size
window_frame = self._nswindow.frame()
AttributeError: 'NoneType' object has no attribute 'frame'
我正在使用 Python 2.7.11 和 OSX 10.11。有没有人遇到过类似的问题?
作者已在此修复此问题 https://github.com/mikedh/trimesh/issues/61。
我正在使用 Python trimesh 库来操作和分析三角形网格。
调用 show()
方法 returns 一个 AttributeError :
import trimesh
mesh = trimesh.load_mesh("myfile.stl")
mesh.show()
Traceback (most recent call last):
File "/Users/cg/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-5-cbb52bec63cc>", line 1, in <module>
mesh.show()
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/base.py", line 1339, in show
scene.show(**kwargs)
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/scene.py", line 383, in show
viewer()
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/scene.py", line 380, in viewer
SceneViewer(self, **kwargs)
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/viewer.py", line 31, in __init__
self.reset_view(flags=flags)
File "/Users/cg/anaconda/lib/python2.7/site-packages/trimesh/scene/viewer.py", line 125, in reset_view
if (self.width is not None and
File "/Users/cg/anaconda/lib/python2.7/site-packages/pyglet/window/__init__.py", line 850, in <lambda>
width = property(lambda self: self.get_size()[0],
File "/Users/cg/anaconda/lib/python2.7/site-packages/pyglet/window/cocoa/__init__.py", line 398, in get_size
window_frame = self._nswindow.frame()
AttributeError: 'NoneType' object has no attribute 'frame'
我正在使用 Python 2.7.11 和 OSX 10.11。有没有人遇到过类似的问题?
作者已在此修复此问题 https://github.com/mikedh/trimesh/issues/61。