【解决labelimg标注图片闪退问题】drawLine(self, l: QLineF): argument 1 has unexpected type ‘float‘ | 您所在的位置:网站首页 › rediscommandtimeout闪退 › 【解决labelimg标注图片闪退问题】drawLine(self, l: QLineF): argument 1 has unexpected type ‘float‘ |
在labelimg进行图片标注时,出现闪退报错如下:drawLine(self, l: QLineF): argument 1 has unexpected type ‘float’ 报错信息如下 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' 尝试方法1尝试了修改文件代码这个方法,但是依旧闪退 将canvas.py文件 526、530、531行的float改为int。(找不到文件的话,直接搜索就行) 参考:https://blog.csdn.net/red_flag1921/article/details/130487444?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170576410916800225547096%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=170576410916800225547096&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-1-130487444-null-null.142v99pc_search_result_base8&utm_term=drawLine%28self%2C%20l%3A%20QLineF%29%3A%20argument%201%20has%20unexpected%20type%20float&spm=1018.2226.3001.4187 如图所示分别为修改前后: python版本过高,我的base环境里面使用的是python 3.11 尝试方法2(可解决)使用以下代码,创建一个版本较低的python环境 conda create -n labelimg python =3.9 conda创建labelimg的环境,指定python版本为3.9 插入链接与图片
另外,labelimg的使用教程可参考:https://blog.csdn.net/J_oshua/article/details/130017483 |
CopyRight 2018-2019 实验室设备网 版权所有 |