# loadable Module not loading .json file into combo box correctly

**URL:** https://discourse.slicer.org/t/loadable-module-not-loading-json-file-into-combo-box-correctly/4856
**Category:** Support
**Tags:** segmentation, extensions-manager, python
**Created:** [November 23, 2018, 2:56am UTC](https://discourse.slicer.org/t/loadable-module-not-loading-json-file-into-combo-box-correctly/4856 "2018-11-23T02:56:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Marcos\_Soares](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Marcos\_Soares](https://discourse.slicer.org/u/Marcos_Soares)
#### Post date: [November 23, 2018, 2:56am UTC](https://discourse.slicer.org/t/loadable-module-not-loading-json-file-into-combo-box-correctly/4856/1 "2018-11-23T02:56:01Z")

</div>

Operating system: Mint 18  
Slicer version: 4.8  
Expected behavior: A list of data in the combo box should be exhibited  
Actual behavior: Nothing is displayed.

Hi everyone, i am new here and i am having a problem third party slicer extension called SEEG-Assistant, and i would appreciate any help with that.

I am working with a loadable module for electrodes segmentation through fiducial marks.  
Those Fiducial markers should be loaded and displayed by the module automatically, but that doesn’t happen.  
I am not really sure that the provided instructions in the original code is right or is enough for that.  
i am sending parts of the code with the related configurations, github link for the original code, and print screen of the module interface.

[Full code link](https://github.com/mnarizzano/SEEGA)

Thank you!

relevant code parts

```
 #### Configure Segmentation - Section
    ### Read from files the list of the modules
    with open(slicer.modules.ContactPositionEstimatorInstance.electrodeTypesPath) as data_file:
        # models is a dictionary with the name of electrode type is the key
        self.models = json.load(data_file)

    #### Create the caption table for the configuration
    self.tableCaption = ["Name", "Type/Model", "TP", "cEP"]
    self.tableHsize = [80, 180, 50, 50]
    self.captionGB = qt.QGroupBox(self.segmentationCB)
    self.captionBL = qt.QHBoxLayout(self.captionGB)
    self.captionBL.setMargin(1)
    for i in (xrange(len(self.tableCaption))):
        a = qt.QLabel(self.tableCaption[i], self.captionGB)
        a.setMaximumWidth(self.tableHsize[i])
        a.setMaximumHeight(20)
        a.setStyleSheet("qproperty-alignment: AlignCenter;")
        self.captionBL.addWidget(a)

    self.segmentationFL.addRow("", self.captionGB)
    self.electrodeList = []

```

PrintScreen

 ![Screenshot%20from%202018-11-23%2000-31-15](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/5/c51a17836a76d1867fbf7e4cd0cf45fb27cfa610.png)

---

<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: [November 23, 2018, 3:48am UTC](https://discourse.slicer.org/t/loadable-module-not-loading-json-file-into-combo-box-correctly/4856/2 "2018-11-23T03:48:07Z")

</div>

I had a look at the code and it seems that first you need to specify markup points and set name of entry and target points to have the exact same name:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/6/d67f2cd5146cfcebf5f8e211b6887c087b8d73db.png)

Then in Contact position estimator module, select the markup list in the “Fiducial list” selector:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/d/fd08e23222f28cd4385044630272ddaaba094894.png)

For further questions, I would recommend to contact the developers of this extension. If they are not available, you can [attach a debugger](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting#How_can_I_use_a_visual_debugger_for_step-by-step_debugging) and run the code step by step to see how exactly it works.
