CMake 3.17.2 to 3.18.4 update seems to have made all python tests fail?

Hi all,

For weeks now, the dashboards I submit have been very non-green. There are a huge number of tests failing, just about all of them Python tests. ex: On Rogue14, things were ok on 2020-10-12 then ~700 test started failing the day after.

I keep a log of changes to my bots, and on 2020-10-12 that bot was updated from CMake 3.17.2 to 3.18.4. Presumably that was the cause.

Example error output:

Traceback (most recent call last):
  File "/Users/builder/external/VTK/Utilities/vtkTclTest2Py/rtImageTest.py", line 12, in <module>
    import vtk
  File "/Users/builder/external/VTK-clang-dbg-x86_64/lib/python2.7/site-packages/vtk.py", line 9, in <module>
    vtkmodules_m = importlib.import_module('vtkmodules')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/builder/external/VTK-clang-dbg-x86_64/lib/python2.7/site-packages/vtkmodules/__init__.py", line 15, in <module>
    import _vtkmodules_static
ImportError: No module named _vtkmodules_static

I don’t know much about CMake or Python. Can anyone help?

Thanks,

Sean

@ben.boeckel

So I tried different versions of CMake to squeeze the issue.

CMake 3.17.2 : good
CMake 3.17.5 : good
CMake 3.18.0 : good
CMake 3.18.1 : good
CMake 3.18.2 : bad
CMake 3.18.4 : bad
CMake 3.19.0 : bad
CMake 3.19.1 : bad

Just a guess, was there a change in Python versions between CMake 3.18.1 & 3.18.2 or the CMake VTK options at that point?
If I get messages like:

ImportError: No module named _vtkmodules_static

it may indicate a CMake Python option or Python version changed.

Nothing in the cmake release notes here jumps out to me:

https://cmake.org/cmake/help/latest/release/3.18.html#id2

I guess I could file a ticket with the cmake project…

Am I the only one seeing this issue? Maybe it’s Mac-only?

@seanm I don’t have a Mac but I am in the process of updating Python to Python 3.9 on Windows and Kubuntu.
If I update Python but don’t rebuild VTK to pick up the new version of Python I get this error when running a python script:

ModuleNotFoundError: No module named '_vtkmodules_static'

Once I rebuild VTK it is all Ok. When rebuilding VTK for a new version of Python I usually remove all Python related files then run CMake again.

Hope this helps.

Andrew, I’ve not touched my python installation at all. It’s just the ancient 2.7 version that comes with macOS.