# Module disappearing after restarting

**URL:** <https://discourse.slicer.org/t/module-disappearing-after-restarting/10818>\
**Category:** Support\
**Created:** [March 24, 2020, 7:48pm UTC](https://discourse.slicer.org/t/module-disappearing-after-restarting/10818 "2020-03-24T19:48:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Queen\_Rei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/queen_rei/32/6348_2.png) [@Queen\_Rei](https://discourse.slicer.org/u/Queen_Rei)\
**Post date:** [March 24, 2020, 7:48pm UTC](https://discourse.slicer.org/t/module-disappearing-after-restarting/10818/1 "2020-03-24T19:48:18Z")

</div>

Howdy~

**I have run into an issue where when I add these lines of code:**

loadedVolumeNode = slicer.util.loadVolume(‘Z:/Something/LumbarCT’, {}, returnNode=True)  
vol=slicer.util.getNode(‘Lumbar\*’)  
vol.GetImageData().GetDimensions()

**then my module stops updating and then when I restart it gives me the following error:**  
Traceback (most recent call last):  
File “Z:/Slicer 4.10.2/bin/…/lib/Slicer-4.10/qt-scripted-modules/ExtensionWizard.py”, line 273, in selectExtension  
xd = SlicerWizard.ExtensionDescription(sourcedir=path)  
File “Z:\Slicer 4.10.2\bin\Python\SlicerWizard\ExtensionDescription.py”, line 136, in **init**  
self.\_setProjectAttribute(“homepage”, p, required=True)  
File “Z:\Slicer 4.10.2\bin\Python\SlicerWizard\ExtensionDescription.py”, line 183, in _setProjectAttribute  
v = project.getValue("EXTENSION_" + name.upper(), default, substitute)  
File “Z:\Slicer 4.10.2\bin\Python\SlicerWizard\ExtensionProject.py”, line 280, in getValue  
raise KeyError(“script does not set %r” % name)  
KeyError: “script does not set ‘EXTENSION\_HOMEPAGE’”

My ultimate goal is to import a DICOM from a file on my PC, segment it automatically, then export it onto a file on my PC. This is the importing part of this ultimate goal.

Thank you advance! Always a pleasure to learn more~

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 24, 2020, 8:07pm UTC](https://discourse.slicer.org/t/module-disappearing-after-restarting/10818/2 "2020-03-24T20:07:11Z")

</div>

You only need to use the ExtensionWizard once, to create your module. Once your module is created, you can update it by clicking on “Reload” button in Reload&Test section of the module GUI.

If your module does not show up in the module list then add its path to additional module paths in menu: Edit / Application settings / Modules.

---

<div class="post-metadata">

**Author:** ![Queen\_Rei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/queen_rei/32/6348_2.png) [@Queen\_Rei](https://discourse.slicer.org/u/Queen_Rei)\
**Post date:** [March 24, 2020, 9:15pm UTC](https://discourse.slicer.org/t/module-disappearing-after-restarting/10818/3 "2020-03-24T21:15:57Z")

</div>

I have been doing that as well. When I comment out the lines of code I outlined above for importing, the module reappears.

**When I uncomment it, then I get the following error and module disappears on restart**  
Traceback (most recent call last):  
File “Z:\Slicer 4.10.2\bin\Python\slicer\ScriptedLoadableModule.py”, line 195, in onReload  
slicer.util.reloadScriptedModule(self.moduleName)  
File “Z:\Slicer 4.10.2\bin\Python\slicer\util.py”, line 623, in reloadScriptedModule  
moduleName, fp, filePath, (’.py’, ‘r’, imp.PY\_SOURCE))  
File “Z:/LoadSegMod/DicomTesting/SegmentDicom/SegmentDicom.py”, line 158  
vol = slicer.util.getNode(‘Lumbar\*’)  
^  
IndentationError: unindent does not match any outer indentation level

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 24, 2020, 10:32pm UTC](https://discourse.slicer.org/t/module-disappearing-after-restarting/10818/4 "2020-03-24T22:32:42Z")

</div>

Python failed to parse your file due to an indentation error. You need to pay very close attention to correct indentation when developing in Python - you must not mix spaces and tabs for indentation, and all lines in the same block must have the same number of leading spaces or tabs.
