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

ImportError: cannot import name 'VTK_UNICODE_STRING' from 'vtk.util.vtkConstants' when importing load_summary_stats #15

Closed
WMDA opened this issue Jun 21, 2022 · 2 comments

Comments

@WMDA
Copy link

WMDA commented Jun 21, 2022

Hi

I am getting this import error ImportError: cannot import name 'VTK_UNICODE_STRING' from 'vtk.util.vtkConstants' when I try to import from enigmatoolbox.datasets import load_summary_stats

This happens in python 3.8 and python 3.9 on a linux ubuntu and linux redhat distros

It looks like VTK_UNICODE_STRING is depreciated (https://gitlab.kitware.com/vtk/vtk/-/issues/18327) and there is definitely no VTK_UNICODE_STRING in vtk.util.vtkConstants.

I can do everything I want to do by from vtk.util.vtkConstants import VTK_STRING#, VTK_UNICODE_STRING in the vtk.wrappers.utils file and was going to issue a pull request however saw this then effects the is_vtk_string() function in that file which seems to be used all over vtk.interface and my pull request would probably break everything.

Thanks

@joebathelt
Copy link

I managed to get around that error by downgrading vtk to version 9.1.0:

pip install --upgrade vtk==9.1.0

@saratheriver
Copy link
Collaborator

Noice - thank you beautiful people 😇 The toolbox was only tested on python 3.7 so I appreciate you pointing out these bugs + fixes!

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