# Trouble loading custom scripted module (HallerIndex) in Slicer 5.8.1 on macOS

**URL:** <https://discourse.slicer.org/t/trouble-loading-custom-scripted-module-hallerindex-in-slicer-5-8-1-on-macos/42918>\
**Category:** Development\
**Created:** [May 14, 2025, 5:24am UTC](https://discourse.slicer.org/t/trouble-loading-custom-scripted-module-hallerindex-in-slicer-5-8-1-on-macos/42918 "2025-05-14T05:24:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![giovaniwm](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@giovaniwm](https://discourse.slicer.org/u/giovaniwm)\
**Post date:** [May 14, 2025, 5:24am UTC](https://discourse.slicer.org/t/trouble-loading-custom-scripted-module-hallerindex-in-slicer-5-8-1-on-macos/42918/1 "2025-05-14T05:24:05Z")

</div>

Hello everyone,

I’m trying to load a custom scripted module called **HallerIndex** into **3D Slicer 5.8.1** on **macOS** , but the module is not being recognized by the application.

### 🔧 My goals:

The module aims to calculate the **Haller Index** from CT images, using a simple UI built in Qt Designer. It is structured as a standard ScriptedLoadableModule.

### 📁 My folder structure:

objectivec

CopiarEditar

```auto
HallerIndex_Extracted/
├── CMakeLists.txt
└── HallerIndex/
    ├── CMakeLists.txt
    ├── HallerIndex.py
    ├── __init__.py
    └── Resources/
        └── UI/
            └── HallerIndex.ui

```

### ✅ Steps already taken:

- I added the path in **Application Settings \> Modules \> Additional module paths**.
- Restarted Slicer.
- Searched for the module using the **Module Finder**.
- Tried loading via `slicer.modules.hallerindex` in the Python console.
- Also tested with Slicer 5.8.0 and 5.6.2.
- Verified naming, indentation, and ScriptedLoadableModule compliance.

### ❌ Result:

- The module doesn’t appear in the module list.
- The Python console returns:  
`AttributeError: module 'modules' has no attribute 'hallerindex'`
- When trying to load it via the Extension Wizard, I get:  
`KeyError: script does not set 'EXTENSION_HOMEPAGE'` or  
`EOFError: could not find project`

### 🆘 What I need:

I’d like help identifying what might be wrong in the setup or code that’s preventing the module from loading. Has anyone successfully installed a custom ScriptedLoadableModule in Slicer 5.8.1 on macOS recently?

Thank you in advance!  
—Giovani

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 14, 2025, 11:20am UTC](https://discourse.slicer.org/t/trouble-loading-custom-scripted-module-hallerindex-in-slicer-5-8-1-on-macos/42918/2 "2025-05-14T11:20:43Z")

</div>

> [@giovaniwm](#):
>
> Searched for the module using the **Module Finder**.

Did you find the entry “HallerIndex” in the module finder dialog and did it indicate not loaded?

> [@giovaniwm](#):
>
> I added the path in **Application Settings \> Modules \> Additional module paths**.

What was the full path that you added?

---

<div class="post-metadata">

**Author:** ![giovaniwm](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@giovaniwm](https://discourse.slicer.org/u/giovaniwm)\
**Post date:** [May 14, 2025, 4:26pm UTC](https://discourse.slicer.org/t/trouble-loading-custom-scripted-module-hallerindex-in-slicer-5-8-1-on-macos/42918/3 "2025-05-14T16:26:17Z")

</div>

Good morning, I’ll send it now

The full path I added in **Application Settings \> Modules \> Additional module paths** was:

```auto

swift

/Users/giovaniwaltrickmezzalira/Desktop/HallerIndex_Extracted

```

Inside this folder, I have:

```auto

objectivec

HallerIndex_Extracted/
├── CMakeLists.txt
└── HallerIndex/
    ├── CMakeLists.txt
    ├── HallerIndex.py
    ├── __init__.py
    └── Resources/
        └── UI/
            └── HallerIndex.ui

```

Let me know if I should change the structure or path. Thanks for your help!

“Here is a screenshot of the folder I added as the module path.

(Attachment CMakeLists.txt is missing)

(Attachment HallerIndex.py is missing)

(Attachment HallerIndex.zip is missing)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 14, 2025, 5:36pm UTC](https://discourse.slicer.org/t/trouble-loading-custom-scripted-module-hallerindex-in-slicer-5-8-1-on-macos/42918/4 "2025-05-14T17:36:40Z")

</div>

> [@giovaniwm](#):
>
> ```auto
> /Users/giovaniwaltrickmezzalira/Desktop/HallerIndex_Extracted
> 
> ```

Instead of a path to the extension directory, try specifying the path to the module directory.

`/Users/giovaniwaltrickmezzalira/Desktop/HallerIndex_Extracted/HallerIndex`
