- 博客(6)
- 收藏
- 关注
原创 python报错:ERROR: Cannot determine archive format of C:\Users\DELL\AppData\Local\Temp\pip-req-build-ox
重新输入以下命令pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn resnet安装成功
2021-11-17 15:37:02
11844
6
原创 Pandas 报错:index must be monotonic increasing or decreasing
报错:index must be monotonic increasing or decreasingdf.reindex(index=ni,columns=nc,method='ffill')把method 方法写出来改为nd = df.reindex(index=ni,columns=nc).ffill()就OK了
2020-12-08 16:03:00
1337
原创 opencv图片上画矩形框
imread()函数:读取图片imread(filepath, flags=None)参数:filepath:图片路径flags:图片标志cv2.IMREAD_COLOR:默认参数,读入一副彩色图片,忽略alpha通道 cv2.IMREAD_GRAYSCALE:读入灰度图片 cv2.IMREAD_UNCHANGED:顾名思义,读入完整图片,包括alpha通道puttext()函数:在image上写字putText(img, text, org, fontFace, font
2020-11-17 18:19:42
1366
原创 python 解决 local variable XXX referenced before assignment 错误
原因:1.变量引用前没有定义;2.定义的变量是局部变量。解决方法:1.在引用先定义变量;2.使用global关键字,在函数内部声明,该变量是全局变量。函数内部对函数外的变量进行操作,就需要在函数内部声明其为global。#python代码:a = 1def test(flag): global a if flag: a = 5 else: a print(test) return a...
2020-09-14 20:30:15
5237
原创 Django报错'tuple' object has no attribute 'get'
在views.py文件中return render(request,'myApp/index.html'),return最后多加了逗号!!!修改后return render(request,'myApp/index.html')
2020-04-08 15:30:39
2062
原创 django.db.utils.InternalError: (1366, "Incorrect string value: '\\xE8..' ffor column 'name' at row 1
django.db.utils.InternalError: (1366, “Incorrect string value: ‘\xE8\x96\x9B\xE8\x89\xB3…’ for column ‘sname’ at row 1”)解决方法数据库编码格式的问题添加数据时出现以上1366错误,在网上找了很多解决方法,就是为了不重新创建数据库,但是都不能解决,只能删除数据库重新创建删除数...
2020-03-29 19:54:02
1749
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅