pypr / pysph

A framework for Smoothed Particle Hydrodynamics in Python
http://pysph.readthedocs.io
Other
455 stars 138 forks source link

pysph view does not view cube output simulation #280

Closed burakbayramli closed 2 years ago

burakbayramli commented 4 years ago

I have

pysph 1.0a6 traits 6.1.1 traitsui 7.0.1 vtk 8.1.2 mayavi 4.7.1

I installed pysph through pip, compiling was giving too many errors.

When I tried to run pysph it complained about missing packages (which pip on pysph package did not install). The extra pkg installations had problems I had to downgrade to vtk 8.1.2 otherwise mayavi would not install.

I could run and generate simulation output fine. But when I tried to view the output, even after pysph command line stopped complaining on pkgs, I get the error

$ pysph view cube_output/

Exception occurred in traits notification handler for object: <pysph.tools.mayavi_viewer.MayaviViewer object at 0x7f52bc32cd58>, trait: files, old value: [], new value: ['cube_output/cube_0.npz', 'cube_output/cube_5.npz']
Traceback (most recent call last):
  File "/home/user/Documents/env3/lib/python3.6/site-packages/traits/trait_notifiers.py", line 340, in __call__
    self.handler(*args)
  File "/home/user/Documents/env3/lib/python3.6/site-packages/pysph/tools/mayavi_viewer.py", line 893, in _files_changed
    self._file_count_changed(fc)
  File "/home/user/Documents/env3/lib/python3.6/site-packages/pysph/tools/mayavi_viewer.py", line 911, in _file_count_changed
    data = load(fname)
  File "/home/user/Documents/env3/lib/python3.6/site-packages/pysph/solver/output.py", line 298, in load
    return output.load(fname)
  File "/home/user/Documents/env3/lib/python3.6/site-packages/pysph/solver/output.py", line 79, in load
    return self._load(fname)
  File "/home/user/Documents/env3/lib/python3.6/site-packages/pysph/solver/output.py", line 135, in _load
    solver_data = _get_dict_from_arrays(data["solver_data"])
  File "/home/user/Documents/env3/lib/python3.6/site-packages/numpy/lib/npyio.py", line 255, in __getitem__
    pickle_kwargs=self.pickle_kwargs)
  File "/home/user/Documents/env3/lib/python3.6/site-packages/numpy/lib/format.py", line 727, in read_array
    raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False

Any ideas?

prabhuramachandran commented 4 years ago

Sorry about that, please use the github version. Like so

git clone https://github.com/pypr/pysph
cd pysph
pip install -r requirements.txt
python setup.py develop # or python setup.py install or pip install -e .

Will try and cut a release in the next 2 weeks.