Skip to content

Distance detector through a unhandled error () #178

@singh25025

Description

@singh25025

Describe the bug
A ZeroDivisionError: integer modulo by zero error popup appears immediately upon selecting the "Distance detector" under the Stream section in the Exploration Tool. Other detectors and features appear to be working fine. Based on the traceback, the error originates in _detector.py when validating max_step_length.

To reproduce
Steps to reproduce the behavior:

  1. Open the Acconeer Exploration Tool.
  2. Navigate to the 'Stream' section on the left sidebar.
  3. Click on 'Distance detector'.
  4. See the "Unhandled error - please file a bug" popup with the integer modulo by zero message.

Traceback

Traceback (most recent call last):
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\app\new\ui\misc.py", line 104, in context
    yield
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\app\new\pluginbase\ui_plugin_base.py", line 57, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\app\new\pluginbase\ui_plugin_base.py", line 48, in wrapper
    raise e
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\app\new\pluginbase\ui_plugin_base.py", line 40, in wrapper
    return f(instance, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\a121\algo\distance\_detector_plugin.py", line 585, in on_backend_state_update
    results = state.config._collect_validation_results()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\a121\algo\distance\_detector.py", line 201, in _collect_validation_results
    not utils.is_divisor_of(24, self.max_step_length)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\a121\_core\utils.py", line 147, in is_divisor_of
    return is_multiple_of(dividend, divisor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\man.singh\AppData\Roaming\Python\Python312\site-packages\acconeer\exptool\a121\_core\utils.py", line 138, in is_multiple_of
    return product >= multiplier and product % multiplier == 0
                                     ~~~~~~~~^~~~~~~~~~~~
ZeroDivisionError: integer modulo by zero

Installed packages

acconeer-exptool==7.17.6
attributes-doc==0.4.0
attrs==26.1.0
beautifulsoup4==4.14.3
bs4==0.0.2
cbor2==5.9.0
certifi==2026.2.25
cfgv==3.5.0
charset-normalizer==3.4.6
colorama==0.4.6
commonmark==0.9.1
contourpy==1.3.3
cycler==0.12.1
distlib==0.4.0
docutils==0.22.4
exceptiongroup==1.1.1
filelock==3.25.2
fonttools==4.62.1
h5py==3.16.0
identify==2.6.18
idna==3.11
importlib_resources==6.5.2
kiwisolver==1.5.0
libusb-package==1.0.26.3
linkify-it-py==2.1.0
markdown-it-py==4.0.0
matplotlib==3.10.8
mdit-py-plugins==0.5.0
mdurl==0.1.2
nodeenv==1.10.0
numpy==2.4.3
packaging==26.0
pandas==3.0.1
pillow==12.1.1
pip==26.0.1
platformdirs==4.9.4
pre_commit==4.5.1
psutil==7.2.2
Pygments==2.19.2
pyparsing==3.3.2
pyperclip==1.11.0
pyqtdarktheme==0.1.7
pyqtgraph==0.14.0
pyserial==3.5
PySide6==6.8.3
PySide6_Addons==6.8.3
PySide6_Essentials==6.8.3
python-dateutil==2.9.0.post0
python-discovery==1.2.0
pyusb==1.3.1
PyYAML==6.0.3
QtAwesome==1.4.1
QtPy==2.4.3
requests==2.32.5
rich==12.6.0
scipy==1.17.1
shiboken6==6.8.3
six==1.17.0
soupsieve==2.8.3
textual==0.1.18
tqdm==4.67.3
typing_extensions==4.15.0
tzdata==2025.3
uc-micro-py==2.0.0
urllib3==2.6.3
virtualenv==21.2.0
xlsxwriter==3.2.9
xmodem==0.5.0```

Screenshots
Image

Environment (please complete the following information):

  • Host OS: Windows (Python 3.12.10, MSC v.1943 64-bit AMD64)
  • Acconeer hardware: SparkFun XM125 PCB + XE125
  • Acconeer software version: a121-v1.12.0
  • Exploration version: 7.17.6

Additional context
The issue is isolated to the Distance detector; other detectors and reference apps in the tool load and operate correctly without throwing this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions