Skip to content

"Math domain error" when rescanning for duplicates #1960

@trollusk

Description

@trollusk

Hydrus version

657

Qt major version

Qt 6

Operating system

Windows 11

Install method

Extract

Install and OS comments

No response

Bug description and reproduction

In the "duplicates > preparation" tab, I increased the search distance from 0 to 2 and clicked the play button to rescan the database.
It scanned successfully but during the scan the message "math domain error" was spammed 50+ times.
The trace back was:

v657, win32, frozen
ValueError
math domain error
================ Exception ================
ValueError: math domain error
================ Traceback ================
Traceback (most recent call last):
  File "hydrus\core\processes\HydrusThreading.py", line 416, in run
  File "hydrus\client\gui\ClientGUIAsync.py", line 203, in _doWork
  File "hydrus\client\ClientController.py", line 483, in CallBlockingToQt
  File "hydrus\client\ClientController.py", line 422, in qt_code
  File "hydrus\client\gui\duplicates\ClientGUIPotentialDuplicatesSearchContext.py", line 211, in pre_work_callable
  File "hydrus\client\gui\duplicates\ClientGUIPotentialDuplicatesSearchContext.py", line 452, in _WeAreDoingACountEstimateAndHaveEnough
  File "hydrus\client\duplicates\ClientPotentialDuplicatesSearchContext.py", line 684, in GetRelativeErrorAt95Certainty
  File "hydrus\client\duplicates\ClientPotentialDuplicatesSearchContext.py", line 667, in relative_halfwidth_from_counts
  File "hydrus\client\duplicates\ClientPotentialDuplicatesSearchContext.py", line 651, in wilson_ci_with_fpc
  File "hydrus\client\duplicates\ClientPotentialDuplicatesSearchContext.py", line 641, in wilson_ci
ValueError: math domain error
================== Stack ==================
  File "threading.py", line 1032, in _bootstrap
  File "threading.py", line 1075, in _bootstrap_inner
  File "hydrus\core\processes\HydrusThreading.py", line 431, in run
  File "hydrus\client\ClientData.py", line 174, in ShowExceptionClient
  File "hydrus\client\ClientData.py", line 213, in ShowExceptionTupleClient
  File "hydrus\core\HydrusData.py", line 335, in PrintExceptionTuple
=================== End ===================

Log output


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions