标注工具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详细步骤

相关推荐
iAm_Ike2 小时前
Go 中自定义类型与基础类型间的显式类型转换详解
jvm·数据库·python
iuvtsrt2 小时前
Golang怎么实现方法集与接口的匹配_Golang如何理解值类型和指针类型实现接口的区别【详解】
jvm·数据库·python
chao1898443 小时前
基于 SPEA2 的多目标优化算法 MATLAB 实现
开发语言·算法·matlab
赏金术士3 小时前
Kotlin 习题集 · 高级篇
android·开发语言·kotlin
旦莫3 小时前
AI驱动的纯视觉自动化测试:知识库里应该积累什么知识内容
人工智能·python·测试开发·pytest·ai测试
楼兰公子4 小时前
buildroot 在编译rust时裁剪平台类型数量的方法
开发语言·后端·rust
知识领航员4 小时前
蘑兔AI音乐深度实测:功能拆解、实测表现与适用场景
java·c语言·c++·人工智能·python·算法·github
吴声子夜歌5 小时前
Go——并发编程
开发语言·后端·golang
ooseabiscuit5 小时前
Laravel4.x:现代PHP框架的奠基之作
java·开发语言·php
c1s2d3n4cs6 小时前
Qt模仿nlohmann::json进行序列化和反序列化
开发语言·qt·json