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

Error loading mesh while using Pyvista with vtk-egl #6200

Closed
7 tasks done
topcat opened this issue Jun 4, 2024 Discussed in #6184 · 5 comments
Closed
7 tasks done

Error loading mesh while using Pyvista with vtk-egl #6200

topcat opened this issue Jun 4, 2024 Discussed in #6184 · 5 comments

Comments

@topcat
Copy link

topcat commented Jun 4, 2024

Discussed in #6184

Originally posted by topcat June 3, 2024

First check

  • I added a very descriptive title here.
  • I used the GitHub search to find a similar question and didn't find it.
  • I searched the PyVista documentation, with the integrated search.
  • I already searched in Google "How to X in PyVista" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I will NOT make duplicate discussions or issues in the future.

Commit to Help

  • I commit to help with one of those options.

Sample Code What is the problem, question, or error?

Write a short description telling me what you are doing, what you expect to happen, and what is currently happening.

While loading any mesh, including the ones part of pyvista.examples along with vtk-egl, I get the following error: 

TypeError: argument of type 'vtkmodules.vtkCommonDataModel.vtkFieldData' is not iterable

This error does not occur if I am using standard vtk or vtk-osmesa. 

The code and stack trace to reproduce this is : 

import pyvista
from pyvista import examples
mesh = pyvista.read(examples.antfile)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[redacted path]/.venv/lib/python3.11/site-packages/pyvista/core/utilities/fileio.py", line 201, in read
    mesh = reader.read()
           ^^^^^^^^^^^^^
  File "[redacted path]/.venv/lib/python3.11/site-packages/pyvista/core/utilities/reader.py", line 387, in read
    data._restore_metadata()
  File "[redacted path]/.venv/lib/python3.11/site-packages/pyvista/core/dataobject.py", line 192, in _restore_metadata
    if key in fdata:

TypeError: argument of type 'vtkmodules.vtkCommonDataModel.vtkFieldData' is not iterable

Description

It returns :

TypeError: argument of type 'vtkmodules.vtkCommonDataModel.vtkFieldData' is not iterable

Expected result would be that it loads the mesh

System Information

The vtk-egl version is as below : 

vtk-egl: Version: 9.3.20240525.dev0
( installed from pip install --extra-index-url https://wheels.vtk.org vtk-egl)

System information
--------------------------------------------------

>>> import pyvista as pv
>>> print(pv.Report())

--------------------------------------------------------------------------------
  Date: Mon Jun 03 17:39:10 2024 IST

                OS : Linux
            CPU(s) : 2
           Machine : x86_64
      Architecture : 64bit
       Environment : Python
       GPU Details : error
  MathText Support : True

  Python 3.11.4 (main, Jun  7 2023, 10:13:09) [GCC 12.2.0]

           pyvista : 0.43.8
               vtk : 9.3.20240525
             numpy : 1.26.4
        matplotlib : 3.9.0
            scooby : 0.10.0
             pooch : 1.8.1
            pillow : 10.3.0
             trame : 3.6.0
      trame_client : 3.0.3
      trame_server : 3.0.0
         trame_vtk : 2.8.8
     trame_vuetify : 2.5.0
--------------------------------------------------------------------------------

NOTE: The above output has been taken on a system that does not have a GPU (possibly explaining the GPU: error remark above) but the exact same error exists on a system with GPU and where EGL is working and where vtk-egl works. Loading a mesh using the vtk-egl library, and without pyvista, works fine.

Would appreciate a resolution or a workaround. 

Please let me know if you need any further information from me. 

Thank you.

Regards,
Jeetu

Screenshots

No response

@jourdain
Copy link
Contributor

jourdain commented Jun 4, 2024

Related to #5650

If you pick the oldest version of EGL, it may just work.

@topcat
Copy link
Author

topcat commented Jun 4, 2024 via email

@jourdain
Copy link
Contributor

jourdain commented Jun 4, 2024

I mean the vtk-egl version.

@topcat
Copy link
Author

topcat commented Jun 5, 2024 via email

@banesullivan
Copy link
Member

This should have been resolved by #5650 in release 0.44.0

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

3 participants