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

pyvista issue with point_arrays #12

Open
gusqgm opened this issue May 2, 2023 · 0 comments
Open

pyvista issue with point_arrays #12

gusqgm opened this issue May 2, 2023 · 0 comments

Comments

@gusqgm
Copy link
Collaborator

gusqgm commented May 2, 2023

Following up on the installation of the newest version of pyvista (currently 0.38.5), the following error occurs when running the ViewerTask as exemplified in the example part of the repository:

$ LUIGI_CONFIG_PATH=./config.cfg luigi --local-scheduler --module lstree ViewerTask
/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/improc/io.py:92: UserWarning: registration of accessor <class 'improc.io.DCAccessor'> under name 'dc' for type <class 'pandas.core.series.Series'> is overriding a preexisting attribute with the same name.
pd.api.extensions.register_series_accessor('dc')(cls)
/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/improc/io.py:93: UserWarning: registration of accessor <class 'improc.io.DCAccessor'> under name 'dc' for type <class 'pandas.core.frame.DataFrame'> is overriding a preexisting attribute with the same name.
pd.api.extensions.register_dataframe_accessor('dc')(cls)
INFO: Informed scheduler that task ViewerTask_cell_segmentatio___example_data___nuclei_segmentat_e2bdc17f32 has status PENDING
INFO: Done scheduling tasks
INFO: Running Worker with 16 processes
INFO: [pid 34738] Worker Worker(salt=444163483, workers=16, host=libws01.fmi.ch, username=quingust, pid=34695) running ViewerTask(movie_dirs=["example/data/-"], nuclei_seg_subdir=nuclei_segmentation, cell_seg_subdir=cell_segmentation)
INFO: [pid 34738] Worker Worker(salt=444163483, workers=16, host=libws01.fmi.ch, username=quingust, pid=34695) new requirements ViewerTask(movie_dirs=["example/data/-"], nuclei_seg_subdir=nuclei_segmentation, cell_seg_subdir=cell_segmentation)
INFO: Informed scheduler that task VolumeGridTask_max___gray____red___5_7677de0500 has status PENDING
INFO: Informed scheduler that task DeconvolutionTask_Channel0__9999__9999__999_experiment_json_1a1df7d1ad has status DONE
INFO: Informed scheduler that task DeconvolutionTask_Channel1__9999__9999__999_experiment_json_7638cd360d has status DONE
INFO: Informed scheduler that task ExternalInputFile_example_data_003_f395362fce has status DONE
INFO: Informed scheduler that task ViewerTask_cell_segmentatio___example_data___nuclei_segmentat_e2bdc17f32 has status PENDING
INFO: [pid 34742] Worker Worker(salt=444163483, workers=16, host=libws01.fmi.ch, username=quingust, pid=34695) running VolumeGridTask(movie_config_name=experiment.json, movie_dir=example/data/003-Enterocyst, raw_channel_subdirs=["Channel1", "Channel0"], colormaps=["gray", "red"], blending_mode=max, ref_mesh_subdir=cell_mesh, pattern={subdir}/{fname}-T{time:04d}.{ext}, out_subdir=rgb_grid, crop_margin=5, n_threads=3)
INFO: exporting img grid: example/data/003-Enterocyst/rgb_grid/grid-T0321.vti
INFO: exporting img grid: example/data/003-Enterocyst/rgb_grid/grid-T0322.vti
INFO: exporting img grid: example/data/003-Enterocyst/rgb_grid/grid-T0323.vti
INFO: exporting img grid: example/data/003-Enterocyst/rgb_grid/grid-T0324.vti
ERROR: [pid 34742] Worker Worker(salt=444163483, workers=16, host=libws01.fmi.ch, username=quingust, pid=34695) failed VolumeGridTask(movie_config_name=experiment.json, movie_dir=example/data/003-Enterocyst, raw_channel_subdirs=["Channel1", "Channel0"], colormaps=["gray", "red"], blending_mode=max, ref_mesh_subdir=cell_mesh, pattern={subdir}/{fname}-T{time:04d}.{ext}, out_subdir=rgb_grid, crop_margin=5, n_threads=3)
Traceback (most recent call last):
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/luigi/worker.py", line 191, in run
new_deps = self._run_get_new_deps()
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/luigi/worker.py", line 133, in _run_get_new_deps
task_gen = self.task.run()
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/lstree/segmentation/mesh_tasks.py", line 260, in run
monitor_futures(futures)
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/lstree/luigi_utils.py", line 55, in monitor_futures
return [f.result() for f in futures]
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/lstree/luigi_utils.py", line 55, in
return [f.result() for f in futures]
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/lstree/segmentation/mesh_tasks.py", line 228, in _img_to_grid
grid = rgb_stack_to_grid(rgb_img, self.spacing, bounds)
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/lstree/segmentation/mesh_tasks.py", line 47, in rgb_stack_to_grid
grid.point_arrays["values"] = rgb.reshape(-1, 3, order="F")
File "/tungstenfs/scratch/gliberal/Users/quingust/miniconda3/envs/ls3_jd/lib/python3.7/site-packages/pyvista/core/dataset.py", line 122, in getattr
return super().getattribute(item)
AttributeError: 'UniformGrid' object has no attribute 'point_arrays'
INFO: Informed scheduler that task VolumeGridTask_max___gray____red___5_7677de0500 has status FAILED
INFO: Worker Worker(salt=444163483, workers=16, host=libws01.fmi.ch, username=quingust, pid=34695) was stopped. Shutting down Keep-Alive thread
INFO:
===== Luigi Execution Summary =====

Scheduled 6 tasks of which:

  • 3 complete ones were encountered:
    • 2 DeconvolutionTask(...)
    • 1 ExternalInputFile(path=example/data/003-Enterocyst/experiment.json)
  • 1 failed:
    • 1 VolumeGridTask(...)
  • 2 were left pending, among these:
    • 1 were missing external dependencies:
      • 1 ViewerTask(movie_dirs=["example/data/-"], nuclei_seg_subdir=nuclei_segmentation, cell_seg_subdir=cell_segmentation)
    • 1 was not granted run permission by the scheduler:
      • 1 ViewerTask(movie_dirs=["example/data/-"], nuclei_seg_subdir=nuclei_segmentation, cell_seg_subdir=cell_segmentation)

This progress looks :( because there were failed tasks

===== Luigi Execution Summary =====

this occurs because pyvista has migrated point_arrays -> point_data as explained in their issue #1779. Changing from to point_data in the mesh_tasks.py solves this issue.

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

No branches or pull requests

1 participant