Skip to content

ImportError: cannot import name 'geometry_hash' from 'trimesh.viewer.windowed' #2311

@JBKacerovsky

Description

@JBKacerovsky

Thanks for a fantastic library. It comes in very useful for me all the time!

I ran into a small bug though. Trying to run the example examples/widget.py I got this error:
ImportError: cannot import name 'geometry_hash' from 'trimesh.viewer.windowed'

It seems this function was renamed from geometry_hash to _geometry_hash in commit e68432c but the import was not updated in trimesh/viewer/widget.py.

Changing the widget.py import in my venv site-packages to

from .. import rendering
from .trackball import Trackball
from .windowed import SceneViewer
from .windowed import _geometry_hash as geometry_hash 

fixed the issue for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions