View Issue Details

IDProjectCategoryView StatusLast Update
0004421Slicer4Core: Building (CMake, Superbuild)public2017-08-24 12:18
Reportershenchunxu Assigned Tojcfr  
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformSlicer4.7.0OSWindowsOS Versionwin7
Product Version 
Target VersionFixed in VersionSlicer 4.7.0 
Summary0004421: ImportError: No module named vtk, qt, slicer.util
Description

When I debug slicer.sln in debug mode, there are many errors happened like:

Fail to instantiate module "SlicerOrientationSelectorTest"
Traceback <most recent call last>:
File "<string>", line 1, in <module>
File "D:/Slicer4D/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SlicerTransformInteractionTest1.py",line 3, iin <module>
import vtk, qt, ctk,slicer
ImportError: No module named vtk

the same errors also happened like:
ImportError: No module named qt
ImportError: No module named slicer.util

Steps To Reproduce

1.When Visual Studio is started, open the ...\Slicer-build\Slicer.sln solution
2.Set the SlicerApp as StartUp project (right-click on SlicerApp project and select "Set as StartUp Project")
3.Run Slicer in debug mode by Start Debugging command (in Debug menu).

Additional Information

Slicer version is Slicer4.7.0
Visual Studio, qt, git, svn, cmake all use recommened configuration.
All build process and debug process are cfollowed the Build Instruction and Debug Instruction respectively.

I am sure that slicer.exe can run normally,but SlicerApp-real.exe failed in debug mode though I have tried more than ten times.

TagsImportError; debug mode; SlicerApp-real.exe

Activities

shenchunxu

shenchunxu

2017-08-24 11:27

reporter  

failed.png (14,018 bytes)
failed.png (14,018 bytes)
jcfr

jcfr

2017-08-24 11:40

administrator   ~0015073

Hi Shenchunxu,

Look like you haven't started Visual Studio with the proper environment.

See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/Debug_Instructions#Using_Visual_Studio

shenchunxu

shenchunxu

2017-08-24 12:04

reporter   ~0015074

thank you,jcfy.
I have solved my problem successfully.

jcfr

jcfr

2017-08-24 12:18

administrator   ~0015075

Great. Thanks for the update.

Issue History

Date Modified Username Field Change
2017-08-24 11:27 shenchunxu New Issue
2017-08-24 11:27 shenchunxu Status new => assigned
2017-08-24 11:27 shenchunxu Assigned To => jcfr
2017-08-24 11:27 shenchunxu File Added: failed.png
2017-08-24 11:27 shenchunxu Tag Attached: ImportError; debug mode; SlicerApp-real.exe
2017-08-24 11:40 jcfr Status assigned => resolved
2017-08-24 11:40 jcfr Resolution open => fixed
2017-08-24 11:40 jcfr Fixed in Version => Slicer 4.7.0
2017-08-24 11:40 jcfr Note Added: 0015073
2017-08-24 12:04 shenchunxu Note Added: 0015074
2017-08-24 12:18 jcfr Status resolved => closed
2017-08-24 12:18 jcfr Note Added: 0015075