enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 284 forks source link

traits.trait_errors.TraitError: The 'stereo_type' trait of a XOpenGLRenderWindow instance must be 'red_blue' ... #1095

Closed shash29-dev closed 2 years ago

shash29-dev commented 2 years ago

while using any function of mlab module e.g. quiver3d, points3d, a trait error is thrown.

traits.trait_errors.TraitError: The 'stereo_type' trait of a XOpenGLRenderWindow instance must be 'red_blue' or 'anaglyph' or 'checkerboard' or 'crystal_eyes' or 'dresden' or 'emulate' or 'fake' or 'interlaced' or 'left' or 'right' or 'split_viewport_horizontal' (or any unique prefix) or 1 or 10 or 11 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9, but a value of 'red_blue' <class 'str'> was specified.

vtk version: 9.0.0 wxpython: 4.1.1 qmake : 3.1 Qt Version: 5.9.7 python 3.8.8 OS: ubuntu 20

milanleonard commented 2 years ago

I also have this issue, if you find a solution please let me know!

mdickinson commented 2 years ago

This results from an incompatibility between the recently released Traits 6.3.0 and the most recent release of Mayavi. Either upgrade to Traits 6.3.1, or use Traits 6.2.0 for now.

mdickinson commented 2 years ago

xref: #1094, #1092

mdickinson commented 2 years ago

I'll close here; this should be fixed at this point. @shash29-dev Thanks for the report; please do comment if you find that the issue persists with Traits 6.3.1. Confirmation that Traits 6.3.1 fixes the issue for you would also be appreciated, if that's the case.

shash29-dev commented 2 years ago

Thanks for the response. Downgrading to traits 6.2.0 works!!

Also, I would like to point out the following: With vtk version: 9.0.3, which is automatically installed by pip as a dependency of mayavi, the import from mayavi import mlab stucks. I built vtk version 9.0.0 from the source and now mayavi is working fine.

mdickinson commented 2 years ago

With vtk version: 9.0.3, which is automatically installed by pip as a dependency of mayavi, the import from mayavi import mlab stucks.

Thanks; this is a known issue, tracked in #1073.