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

相关推荐
{Hello World}27 分钟前
Java抽象类与接口深度解析
java·开发语言
weixin_4469340332 分钟前
统计学中“in sample test”与“out of sample”有何区别?
人工智能·python·深度学习·机器学习·计算机视觉
jiaguangqingpanda1 小时前
Day22-20260118
java·开发语言
weixin_462446231 小时前
使用 Python 测试 Mermaid 与 Graphviz 图表生成(支持中文)
python·mermaid·graphviz
JOBkiller1231 小时前
钢绞线缺陷检测与识别_Cascade-Mask-RCNN_RegNetX模型训练与应用实战
python
nvd111 小时前
深入 ReAct Agent 的灵魂拷问:从幻觉到精准执行的调试实录
python·langchain
Ulyanov1 小时前
战场地形生成与多源数据集成
开发语言·python·算法·tkinter·pyside·pyvista·gui开发
love530love1 小时前
告别环境崩溃:ONNX 与 Protobuf 版本兼容性指南
人工智能·windows·python·onnx·stablediffusion·comfyui·protobuf
风生u1 小时前
bpmn 的理解和元素
java·开发语言·工作流·bpmn
C+-C资深大佬2 小时前
C++数据类型
开发语言·c++·算法