标注工具Labelimg,正常运行显示,但是对图片点击Create RectBox画矩形框开始闪退

问题描述*:标注工具Labelimg,正常运行显示,但是对图片点击Create RectBox画矩形框开始闪退,闪退出现以下代码

File "C:\ProgramData\anaconda3\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, l: QLineF): argument 1 has unexpected type 'float'

drawLine(self, line: QLine): argument 1 has unexpected type 'float'

drawLine(self, x1: int, y1: int, x2: int, y2: int): argument 1 has unexpected type 'float'

drawLine(self, p1: QPoint, p2: QPoint): argument 1 has unexpected type 'float'

drawLine(self, p1: Union[QPointF, QPoint], p2: Union[QPointF, QPoint]): argument 1 has unexpected type 'float'

而且点击Create RectBox点没有线出来,过几秒闪退

c 复制代码
(base) PS C:\Users\Administrator> labelimg
Traceback (most recent call last):
  File "C:\ProgramData\anaconda3\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, l: QLineF): argument 1 has unexpected type 'float'
  drawLine(self, line: QLine): argument 1 has unexpected type 'float'
  drawLine(self, x1: int, y1: int, x2: int, y2: int): argument 1 has unexpected type 'float'
  drawLine(self, p1: QPoint, p2: QPoint): argument 1 has unexpected type 'float'
  drawLine(self, p1: Union[QPointF, QPoint], p2: Union[QPointF, QPoint]): argument 1 has unexpected type 'float'

解决问题

因为可能你安装的Anaconda里python版本过高,比如装的Anaconda是python3.11版本,重把python版本改低一点,那就重新装一个,用anaconda prompt

我们可以新建python低版本环境,在里面在安装。参考以下链接。
Anaconda里装labelimg使用Anaconda Prompt详细步骤

相关推荐
anlogic6 小时前
Java基础 8.18
java·开发语言
喂完待续7 小时前
【Tech Arch】Spark为何成为大数据引擎之王
大数据·hadoop·python·数据分析·spark·apache·mapreduce
沐知全栈开发7 小时前
WebForms XML 文件详解
开发语言
阿巴~阿巴~7 小时前
冒泡排序算法
c语言·开发语言·算法·排序算法
王者鳜錸8 小时前
PYTHON让繁琐的工作自动化-猜数字游戏
python·游戏·自动化
看到我,请让我去学习9 小时前
QT - QT开发进阶合集
开发语言·qt
若天明9 小时前
深度学习-计算机视觉-微调 Fine-tune
人工智能·python·深度学习·机器学习·计算机视觉·ai·cnn
weixin_307779139 小时前
VS Code配置MinGW64编译SQLite3库
开发语言·数据库·c++·vscode·算法
倔强青铜三9 小时前
苦练Python第39天:海象操作符 := 的入门、实战与避坑指南
人工智能·python·面试
励志不掉头发的内向程序员10 小时前
STL库——string(类函数学习)
开发语言·c++