# Bug Report ISO ASO Extension – Missing testWslAvailable and helper methods cause crash

**URL:** <https://discourse.slicer.org/t/bug-report-iso-aso-extension-missing-testwslavailable-and-helper-methods-cause-crash/44364>\
**Category:** Development\
**Tags:** python\
**Created:** [September 5, 2025, 4:58pm UTC](https://discourse.slicer.org/t/bug-report-iso-aso-extension-missing-testwslavailable-and-helper-methods-cause-crash/44364 "2025-09-05T16:58:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabien-prog](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fabien-prog/32/80979_2.png) [@fabien-prog](https://discourse.slicer.org/u/fabien-prog)\
**Post date:** [September 5, 2025, 4:58pm UTC](https://discourse.slicer.org/t/bug-report-iso-aso-extension-missing-testwslavailable-and-helper-methods-cause-crash/44364/1 "2025-09-05T16:58:05Z")

</div>

Hi everyone,

I ran into an issue trying to use the ISO ASO extension (Automated Dental Tools) in 3D Slicer 5.8.1 on Windows 11 with WSL2 + Ubuntu 24.04.

### Problem

When launching ISO ASO and clicking _Run_, the module gets stuck at _“Checking if WSL is installed, this task may take a moment”_. In the Slicer log, I see this error:

```auto
Traceback (most recent call last):
  File ".../ASO.py", line 1506, in onCheckRequirements
    if self.logic.testWslAvailable():
AttributeError: 'ASOLogic' object has no attribute 'testWslAvailable'

```

Later, even after adding that function to ASO.py, I hit:

```auto
AttributeError: 'ASOWidget' object has no attribute 'format_time'

```

### Cause

The current extension code is calling functions that don’t exist in `ASOLogic` and `ASOWidget`:

- `ASOLogic.testWslAvailable()`

- `ASOWidget.format_time()`

- `ASOWidget.update_ui_time()`

Without these, the requirements check crashes and the module never gets to create the conda environment.

### Workaround / Fix

I was able to fix it by adding these functions back into the extension:

**Inside `ASOLogic` (ASO.py):**

```auto
def testWslAvailable(self) -> bool:
    if platform.system() != "Windows":
        return False
    try:
        result = subprocess.run(
            ["wsl", "--status"],
            capture_output=True,
            text=True,
            timeout=5
        )
        return result.returncode == 0
    except Exception:
        return False

```

**Inside `ASOWidget` (ASO.py):**

```auto
def format_time(self, seconds: float) -> str:
    if seconds < 60:
        return f"{int(seconds)}s"
    elif seconds < 3600:
        return f"{int(seconds // 60)}min {int(seconds % 60)}s"
    else:
        return f"{int(seconds // 3600)}h {int((seconds % 3600) // 60)}min {int(seconds % 60)}s"

def update_ui_time(self, start_time: float, previous_time: float) -> str:
    current_time = time.time()
    elapsed = current_time - start_time
    return self.format_time(elapsed)

```

### Result

With these added, the ISO ASO extension now correctly:

- Detects WSL2

- Detects Miniconda

- Creates the conda environment in WSL

- Moves on to library installation

Hope this helps others who get stuck at the same point!

Fabien
