添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
大方的烤面包  ·  org.apache.http.Connec ...·  4 月前    · 
灰常酷的炒面  ·  | notebook.community·  6 月前    · 
憨厚的仙人掌  ·  ZymaD 10000 IU/ml ...·  8 月前    · 

Traceback (most recent call last):
File "C:\Users\5052xxxx\AppData\Local\Programs\Python\Python310\lib\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'

  • **OS: Windows 10 and Windows server 2019 Datacenter
  • PyQt version: 1.8.6
  • p.drawRect(left_top.x(), left_top.y(), rect_width), int(rect_height)
    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())
    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())
    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)
    bar.setValue(int(bar.value() + bar.singleStep() * units))

    Good work.

    Meetpatel-09, TinyKiecoo, abbasabaei, Fahmi-Aziz, laxian, Rohitnyati, matiasnnr, JoshuaPawlik, coolyashas, xKHUNx, and 3 more reacted with thumbs up emoji Meetpatel-09 and Bhargav230m reacted with laugh emoji Meetpatel-09 reacted with hooray emoji abbasabaei, matiasnnr, coolyashas, tirpudevk111, and HoaiMy286 reacted with heart emoji Meetpatel-09 reacted with rocket emoji All reactions
  • line 526 :
    from :
    p.drawRect(left_top.x(), left_top.y(), rect_width, rect_height)
    p.drawRect(int(left_top.x()), int(left_top.y()), int(rect_width), int(rect_height))
  • line 530 :
    from :
    p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height())
    p.drawLine(int(self.prev_point.x()), 0, int(self.prev_point.x()), int(self.pixmap.height()))
  • line 531 :
    from :
    p.drawLine(0, self.prev_point.y(), self.pixmap.width(), self.prev_point.y())
    p.drawLine(0, int(self.prev_point.y()), int(self.pixmap.width()), int(self.prev_point.y()))
  • File labelImg.py
  • x:\xxxxx\Python31x\site-packages\labelImg\labelImg.py

  • line 965 :
    from :
    bar.setValue(bar.value() + bar.singleStep() * units)
    bar.setValue(int(bar.value() + bar.singleStep() * units))
    mayops8, mathswithtina, ellisappspro, Fracca3, heykhoiruls, xKHUNx, tirpudevk111, jagadishcoder, alperenburak, and mdzakyoni reacted with thumbs up emoji sowmyakavali, acbchiella, Mohamed-Mohamed-Ibrahim, Fracca3, alperenburak, MarcoPhanVu, and HoaiMy286 reacted with heart emoji All reactions

    And i got new error on line 532 on canvas.py

    Traceback (most recent call last):
      File "e:\me\wilted-plant-faster-rcnn\.venv\lib\site-packages\libs\canvas.py", line 532, in paintEvent
        p.drawLine(0, self.prev_point.y(), self.pixmap.width(), self.prev_point.y())
    TypeError: arguments did not match any overloaded call:
      drawLine(self, l: QLineF): argument 1 has unexpected type 'int'
      drawLine(self, line: QLine): argument 1 has unexpected type 'int'
      drawLine(self, x1: int, y1: int, x2: int, y2: int): argument 2 has unexpected type 'float'
      drawLine(self, p1: QPoint, p2: QPoint): argument 1 has unexpected type 'int'
      drawLine(self, p1: Union[QPointF, QPoint], p2: Union[QPointF, QPoint]): argument 1 has unexpected type 'int'
    

    So in the line 532, change this line from:
    p.drawLine(0, self.prev_point.y(), self.pixmap.width(), self.prev_point.y())
    p.drawLine(0, int(self.prev_point.y()), int(self.pixmap.width()), int(self.prev_point.y()))

  •