Skip to content

can not load mesh in paraview: cannot unpack non-iterable CellBlock object #1307

Open
@reox

Description

I noticed I could not load meshes with the paraview plugin when using 5.3.4 on python 3.8:

Traceback (most recent call last):
  File "/programs/shared/paraview/ParaView-5.9.0-RC3-MPI-Linux-Python3.8-64bit/lib/python3.8/site-packages/vtkmodules/util/vtkAlgorithm.py", line 152, in ProcessRequest
    return vtkself.ProcessRequest(request, inInfo, outInfo)
  File "/programs/shared/paraview/ParaView-5.9.0-RC3-MPI-Linux-Python3.8-64bit/lib/python3.8/site-packages/vtkmodules/util/vtkAlgorithm.py", line 198, in ProcessRequest
    return self.RequestData(request, inInfo, outInfo)
  File "/home/reox/.local/share/paraview-5.9/plugins/paraview-meshio-plugin.py", line 85, in RequestData
    for meshio_type, data in cells:
TypeError: cannot unpack non-iterable CellBlock object

This line was probably not updated to the (new?) CellBlock class:

for meshio_type, data in cells:

I think changing the lines to:

for cellblock in cells:
    meshio_type = cellblock.type
    data = cellblock.data

should do the trick (at least for me the mesh loads again), but I don't know if anything else has to be changed?

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