======================================================================
ERROR: runTest (Dosimetry4DTest.Dosimetry4DTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/D/P/S-0-E-b/OpenDose3D/Dosimetry4D/Logic/Dosimetry4DTest.py", line 79, in runTest
self.FullTest_positive()
File "/Volumes/D/P/S-0-E-b/OpenDose3D/Dosimetry4D/Logic/Dosimetry4DTest.py", line 484, in FullTest_positive
self.logic.resampleCT()
File "/Volumes/D/P/S-0-E-b/OpenDose3D-build/lib/Slicer-4.13/qt-scripted-modules/Logic/Dosimetry4DLogic.py", line 601, in resampleCT
None, parameters, wait_for_completion=True, update_display=False)
File "/Volumes/D/P/S-0-build/Slicer-build/bin/Python/slicer/cli.py", line 72, in run
node = createNode(module, parameters)
File "/Volumes/D/P/S-0-build/Slicer-build/bin/Python/slicer/cli.py", line 13, in createNode
node = cliLogic.CreateNodeInScene()
AttributeError: 'SlicerBaseLogic.vtkSlicerModuleLogic' object has no attribute 'CreateNodeInScene'
----------------------------------------------------------------------
Has something changed in cli.py or in the cliLogic?
Note that if this error just recently happened it is probably due to the update of the preview build to use VTK9. So thereās likelihood of a lot of underlying issues since VTK is a core dependency. Things will stabilize over the next week or more.
======================================================================
ERROR: runTest (Dosimetry4DTest.Dosimetry4DTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/D/P/S-0-E-b/OpenDose3D/Dosimetry4D/Logic/Dosimetry4DTest.py", line 79, in runTest
self.FullTest_positive()
File "/Volumes/D/P/S-0-E-b/OpenDose3D/Dosimetry4D/Logic/Dosimetry4DTest.py", line 484, in FullTest_positive
self.logic.resampleCT()
File "/Volumes/D/P/S-0-E-b/OpenDose3D-build/lib/Slicer-4.13/qt-scripted-modules/Logic/Dosimetry4DLogic.py", line 614, in resampleCT
None, parameters, wait_for_completion=True, update_display=False)
File "/Volumes/D/P/S-0-build/Slicer-build/bin/Python/slicer/cli.py", line 72, in run
node = createNode(module, parameters)
File "/Volumes/D/P/S-0-build/Slicer-build/bin/Python/slicer/cli.py", line 13, in createNode
node = cliLogic.CreateNodeInScene()
AttributeError: 'SlicerBaseLogic.vtkSlicerModuleLogic' object has no attribute 'CreateNodeInScene'
----------------------------------------------------------------------
Digging a little in Slicer code I found that indeed there is no āCreateNodeInSceneā attribute inside āSlicerBaseLogic.vtkSlicerModuleLogicā, but it exists inside āSlicerBaseLogic.vtkSlicerCLIModuleLogicā. The first is abstract class now and the second inherits from the first. Somehow the cli is losing the concrete class and it is using the abstract one.
Can you provide a minimal example that reproduces the problem you have?
Typically if Python cannot find a specific class (and returns a class at a higher level in the hierarchy) if the Python module is not imported. You may need to do something like import vtkSomeLibraryPython before you try to access a class defined in SomeLibrary. Normally this import happens automatically for all modules that follow conventions but maybe you do something special or something broke in Slicer.
If you experience this in latest Slicer master then enter a bug report and weāll get to it when other VTK upgrade related errors are fixed.
The new Docker version (bishopwolf/slicer3d-nightly:0.4.2) still behaves normally, these errors are not showing. I donāt know how to reproduce the problem. But it is still present in CDash.
I could reproduce the problem on Windows by simply building a latest Slicer master version. Weāll get to it after we fixed more urgent issues (e.g., image not appearing in slice views).
>>> slicer.vtkSlicerCLIModuleLogic()
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: this class cannot be instantiated
Iāve debugged into wrappython.exe and the problem is that for some reason the hierarchy cannot find the parentās class in the hierarchy and so it determines that vtkSlicerCLIModuleLogic is not a VTK class, therefore it looks for a public constructor (instead of New()), which is of course is not found. @jcfr I guess you know whatās going on. Could you have a look?
The issue probably has not been resolved yet, we just switched back temporarily to VTK8 in factory builds due to this and other problems. Keep discussion at https://github.com/Slicer/Slicer/issues/5266 to avoid parallel discussion of the same issue at two places.