pysph visualisation problem

22 views
Skip to first unread message

Leyi Ye

unread,
Mar 30, 2025, 12:03:18 PMMar 30
to pysph-users
Dear developers and/or users

I´ve been trying to install and use pysph for my research project for the last couple of weeks and I´m having quite a hard time to make it work. Any help or guidance would be greatly appreciated. 

For some context, I running a ubuntu 20.04 vm on google cloud with my mac. The commands i followed to install pysph are:

cd pysph
python3 -m venv pysph_env
source /pysph_env/bin/activate
pip install wheel
pip install r requirements.txt
pip install r requirements-test.txt
python setup.py install
pysph test -v

however, after running these and an example test, lest say  pysph run elliptical_drop, i get an error saying:

AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.

In order to solve this, i changed np.bool to np.bool_ in pysph/pysph_env/lib/python3.8/site-packages/compyle/types.py  This seems to solve the problem and the output can be generated correctly. However when i try to visualise the output using pysph view elliptical_drop_output, i get an error saying: ModuleNotFoundError: No module named 'configobj'. So did "pip install configobj". And now after running view I get a error saying:   
File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/tvtk_base.py", line 536, in setup_observers
    _object_cache.setup_observers(self._vtk_obj,
  File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/tvtk_base.py", line 93, in setup_observers
    messenger.connect(vtk_obj, event, method)
  File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/messenger.py", line 302, in connect
    _messenger.connect(obj, event, callback)
  File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/messenger.py", line 148, in connect
    key = hash(obj)
TypeError: unhashable type: 'PolyData'

Also tried to use pysph dump_vtk and turn the hdf5 files into vtk file and visualise them directly using Paraview. But when running the command i get a error saying: 

  File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/tvtk_base.py", line 93, in setup_observers
    messenger.connect(vtk_obj, event, method)
  File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/messenger.py", line 302, in connect
    _messenger.connect(obj, event, callback)
  File "/home/ly1336/pysph/pysph_env/lib/python3.8/site-packages/tvtk/messenger.py", line 148, in connect
    key = hash(obj)
TypeError: unhashable type: 'UnstructuredGrid'

Did I miss out something or did something wrong ?

Im truly stuck here, but PySPH is a fundamental pillar for my research project, so any help would be appreciated. 

Kind regards, 

Leyi

Reply all
Reply to author
Forward
0 new messages