HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.15k stars 6.23k forks source link

labelImg crashing when scrolling (Windows, Python 3.10) #1017

Closed pedro-sa1 closed 9 months ago

pedro-sa1 commented 9 months ago

On Pytthon >= 3.10 there are a few problems already known by the community that makes labbeImg crash when using it. I've looked this specific one but couldn't find anything related, so I'm posting the work-around I've found to solve the crashes when scrolling the image.

ERROR:

QMimeDatabase: Error loading internal MIME data An error has been encountered at line 1 of : Premature end of document.: Traceback (most recent call last): File "C:\Users\xxx\AppData\Local\anaconda3\lib\site-packages\labelImg\labelImg.py", line 1014, in zoom_request self.add_zoom(scale * units) File "C:\Users\xxx\AppData\Local\anaconda3\lib\site-packages\labelImg\labelImg.py", line 974, in add_zoom self.set_zoom(self.zoom_widget.value() + increment) File "C:\Users\xxx\AppData\Local\anaconda3\lib\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'

On file C:\Users\xxxx\AppData\Local\anaconda3\Lib\site-packages\labelImg.py:

Line 971: from: self.zoom_widget.setValue(value) to: self.zoom_widget.setValue(int(value))

Line 1025 from: h_bar.setValue(new_h_bar_value) to: h_bar.setValue(int(new_h_bar_value))

Line 1026: from: v_bar.setValue(new_v_bar_value) to: v_bar.setValue(int(new_v_bar_value))