labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

Ubuntu - not possible to create rectangle - application crash

Open vzeman opened this issue 2 years ago • 12 comments

  • OS: Ubuntu
  • PyQt version:
dpkg -l | grep "pyqt"
ii  python3-dbus.mainloop.pyqt5                                 5.14.1+dfsg-3build1                                                  amd64        D-Bus Qt main loop support for Python 3
ii  python3-pyqt5                                               5.14.1+dfsg-3build1                                                  amd64        Python 3 bindings for Qt5

Python 3.10

Traceback:

  File "/home/vzeman/anaconda3/envs/py10/lib/python3.10/site-packages/libs/canvas.py", line 530, in paintEvent
    p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height())
TypeError: arguments did not match any overloaded call:
  drawLine(self, QLineF): argument 1 has unexpected type 'float'
  drawLine(self, QLine): argument 1 has unexpected type 'float'
  drawLine(self, int, int, int, int): argument 1 has unexpected type 'float'
  drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'float'
  drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'float'
Aborted (core dumped)

Error occured, when I wanted to create rectangle and moved mouse over the image - application always crash

vzeman avatar May 20 '22 07:05 vzeman

Update: with python 3.8 is application not crashing

vzeman avatar May 20 '22 08:05 vzeman

I have this error with Python 3.10.4

ropinheiro avatar May 26 '22 15:05 ropinheiro

i also have this error python 3.10

AjibolaPy avatar Jun 03 '22 00:06 AjibolaPy

Can not reproduce this bug on Debian GNU/Linux with following software versions:

~/src/labelImg (git)-[master] % python3 --version
Python 3.10.5

~/src/labelImg (git)-[master] % dpkg -l | grep "pyqt"
ii  pyqt5-dev-tools                                  5.15.6+dfsg-1+b2                    amd64        Development tools for PyQt5
ii  python3-pyqt5                                    5.15.6+dfsg-1+b2                    amd64        Python 3 bindings for Qt5
ii  python3-pyqt5.sip                                12.10.1-1                           amd64        runtime module for Python extensions using SIP

nine avatar Jun 09 '22 19:06 nine

Same here. Ubuntu 22.04, installed with pip3.

  • labelImg 1.8.6
  • python 3.10.4

The manual installation from the start page works.

dvaupel avatar Jul 04 '22 09:07 dvaupel

same error on Windows, installed with pip

  • python 3.10.5
  • labelimg 1.8.6

Logiase avatar Jul 20 '22 06:07 Logiase

Same issue with me. Solution was to use python3.8 for me.

conda create -n labelImg python=3.8
pip3 install labelImg
python3 $HOME/miniconda3/envs/labelImg/bin/labelImg

Tylermarques avatar Jul 22 '22 17:07 Tylermarques

i am having same problem pls someone help me to resolve it . Question

  1. how can i downgrade the python version 3.10 to 3.9.?

dhanashreemhatre avatar Aug 04 '22 16:08 dhanashreemhatre

same. Windows 10, python 3.10.5

windowshopr avatar Aug 21 '22 01:08 windowshopr

https://github.com/heartexlabs/labelImg/issues/811#issuecomment-977605722

windowshopr avatar Sep 05 '22 06:09 windowshopr

Solution. Error in Qt5. float to int conversion Changed: x:\xxxxx\python-310\Lib\site-packages\libs\canvas.py 526 line: default: p.drawRect(left_top.x(), left_top.y(), rect_width), int(rect_height) new: p.drawRect(int(left_top.x()), int(left_top.y()), int(rect_width), int(rect_height)) 530 line: default: p.drawLine( self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height()) new: p.drawLine( int(self.prev_point.x()), 0, int(self.prev_point.x()), int(self.pixmap.height())) 531 line: default: p.drawLine( 0, self.prev_point.y(), self.pixmap.width(), self.prev_point.y()) new: p.drawLine( 0, int(self.prev_point.y()), int(self.pixmap.width()), int(self.prev_point.y())) Changed: x:\xxxxx\python-310\Lib\site-packages\labelImg\labelImg.py 965 line: default: bar.setValue(bar.value() + bar.singleStep() * units) new: bar.setValue(int(bar.value() + bar.singleStep() * units))

Good work.

ptiszai avatar Nov 09 '22 16:11 ptiszai

Please refer to this comment

daudhiyaa avatar Jan 24 '23 18:01 daudhiyaa