Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unhashable type: 'UnstructuredGrid' #313

Open
p-smith22 opened this issue Jan 21, 2025 · 1 comment
Open

TypeError: unhashable type: 'UnstructuredGrid' #313

p-smith22 opened this issue Jan 21, 2025 · 1 comment

Comments

@p-smith22
Copy link

Hello. I am running MacOS on a Silicon. I quick installed using Anaconda, and when I do sharpy --version, I get a positive return. However, when I run the unittest, I get an error similar to the one below. Also, when I try to run a sharpy file, it successfully makes it through the trim step, but promptly fails and outputs a similar error message when it reaches the actual simulation step. I have also tried custom installing and similarly get a successful install, but the unittest fails in the same manner.
Thank you in advance for your help!

======================================================================
ERROR: test_generatecases (tests.utils.test_generate_cases.TestGenerateCases)

Traceback (most recent call last):
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/tests/utils/test_generate_cases.py", line 191, in test_generatecases
sharpy.sharpy_main.main(['', solver_path])
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/sharpy_main.py", line 167, in main
raise e
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/sharpy_main.py", line 142, in main
data = solvers[solver_name].run(solvers=solvers)
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/solvers/dynamiccoupled.py", line 474, in run
self.time_loop(solvers=solvers)
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/solvers/dynamiccoupled.py", line 722, in time_loop
self.data = self.postprocessors[postproc].run(online=True, solvers=solvers)
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/postproc/beamplot.py", line 90, in run
self.plot(online)
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/postproc/beamplot.py", line 116, in plot
self.write_beam(it)
File "/Users/administrator/Desktop/Python/SHARPy_v2/sharpy/sharpy/postproc/beamplot.py", line 257, in write_beam
ug = tvtk.UnstructuredGrid(points=coords)
File "tvtk_classes/unstructured_grid.py", line 51, in init
tvtk_base.TVTKBase.init(self, vtk.vtkUnstructuredGrid, obj, update, **traits)
File "/Users/administrator/Desktop/Python/SHARPy_v2/.venv/lib/python3.10/site-packages/tvtk/tvtk_base.py", line 435, in init
self.setup_observers()
File "/Users/administrator/Desktop/Python/SHARPy_v2/.venv/lib/python3.10/site-packages/tvtk/tvtk_base.py", line 536, in setup_observers
_object_cache.setup_observers(self._vtk_obj,
File "/Users/administrator/Desktop/Python/SHARPy_v2/.venv/lib/python3.10/site-packages/tvtk/tvtk_base.py", line 93, in setup_observers
messenger.connect(vtk_obj, event, method)
File "/Users/administrator/Desktop/Python/SHARPy_v2/.venv/lib/python3.10/site-packages/tvtk/messenger.py", line 302, in connect
_messenger.connect(obj, event, callback)
File "/Users/administrator/Desktop/Python/SHARPy_v2/.venv/lib/python3.10/site-packages/tvtk/messenger.py", line 148, in connect
key = hash(obj)
TypeError: unhashable type: 'UnstructuredGrid'


@ben-l-p
Copy link
Collaborator

ben-l-p commented Jan 24, 2025

Thanks for reporting this issue. I also encountered a similar issue, and this is due to the TVTK package. Installing the version pip install https://github.com/enthought/mayavi/zipball/master seemed to fix this for me. Hopefully the TVTK team will fix this issue soon, otherwise I will change the install requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants