#938·labelImg

Crashes due to unexpected type 'float'

Author: slavistanCreated Sep 5, 2022Updated Feb 7, 2024

Attempting to zoom via mouse wheel or to draw a bounding box results in an immediate crash. Here's the output when I try to draw a bounding box:

Traceback (most recent call last):
  File "/home/stan/.conda/envs/pytorch_cuda3090/lib/python3.10/site-packages/labelImg/labelImg.py", line 1014, in zoom_request
    self.add_zoom(scale * units)
  File "/home/stan/.conda/envs/pytorch_cuda3090/lib/python3.10/site-packages/labelImg/labelImg.py", line 974, in add_zoom
    self.set_zoom(self.zoom_widget.value() + increment)
  File "/home/stan/.conda/envs/pytorch_cuda3090/lib/python3.10/site-packages/labelImg/labelImg.py", line 971, in set_zoom
    self.zoom_widget.setValue(value)
TypeError: setValue(self, int): argument 1 has unexpected type 'float'
zsh: IOT instruction (core dumped)  labelImg

#841 sounds like the same issue.

$ uname -rvsmio
# Linux 5.19.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 29 Aug 2022 15:51:05 +0000 x86_64 unknown GNU/Linux

$ conda list | grep -E '(qt)|(labelimg)'
# labelimg                  1.8.6           py310hff52083_1    conda-forge
# pyqt                      5.15.7          py310h29803b5_0    conda-forge
# pyqt5-sip                 12.11.0         py310hd8f1fbe_0    conda-forge
# qt-main                   5.15.4               ha5833f6_2    conda-forge