![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
Black leaves
莫等闲
展开
-
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your PATH.
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your PATH. See README file for more information.执行的代码:from PIL import Imageimport pytesseractimage = Image.open("C:\\Users\\\huaixiao\\\Desktop\\\多线程爬虫\\day2\\73转载 2021-01-10 11:01:23 · 270 阅读 · 3 评论 -
文件上传时raise MultiValueDictKeyError(key)
head_img = models.ImageField(upload_to="head/%Y%m/%d", null=True, default="head/default.png", verbose_name="头像")上传的是"1.jpg", 根据models的head_img, 我上传后的文件路径应该是upload_to+文件名查看request.POST中是有传入文件的, 但是request.POST[“head_img”] 或者request.POST.get(“head_img”...原创 2020-08-12 12:55:21 · 588 阅读 · 0 评论 -
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa6 in position 9737: illegal multibyte sequence
如下报错 File "E:\virtual\supermarket\lib\site-packages\django\views\debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "E:\virtual\supermarket\lib\site-packages\django\views\debug.py", line 332, in get_traceback_ht原创 2020-07-30 18:11:23 · 737 阅读 · 0 评论 -
解决Django出现OverflowError: Python int too large to convert to C long
File "C:\Users\huaixiao\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\Users\huaixiao\AppData\Local\Programs\Python\Python37-32\lib\sit..原创 2020-07-16 13:57:06 · 1403 阅读 · 0 评论 -
解决django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing
django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.出错代码原创 2020-07-11 09:44:48 · 506 阅读 · 1 评论 -
AttributeError: module ‘win32ctypes.pywin32.win32api‘ has no attribute ‘error‘
原因是PyInstaller打包图片时格式不正确(需要.ico文件),如果直接把图片格式改为ico,会提示"struct.error: unpack requires a buffer of 16 bytes"解决方式, 访问http://www.ico51.cn/ 把你的图片转为ico, 再PyInstaller即可...原创 2020-07-02 10:31:32 · 1254 阅读 · 2 评论 -
pyinstaller--把代码打包为exe
pip install pyinstaller进入即将打包的py文件的目录pyinstaller -F run.pypyinstaller -F --icon=1234.ico run.py (可以更改exe的图标)原创 2019-12-19 17:02:43 · 112 阅读 · 0 评论