首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Trimesh显示方法返回AttributeError

Trimesh显示方法返回AttributeError
EN

Stack Overflow用户
提问于 2017-06-02 12:31:16
回答 1查看 2K关注 0票数 3

我正在使用Python库来操作和分析三角形网格。调用show()方法将返回一个AttributeError:

代码语言:javascript
复制
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'

我正在使用Python2.7.11和OSX10.11。有没有人遇到过类似的问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-30 12:50:34

作者已在https://github.com/mikedh/trimesh/issues/61这里解决了这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44329039

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档