![](https://img-blog.csdnimg.cn/a89edfce1ae34badb7be988e0a42fa59.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
问题分析解决
python报错信息的解决分析
ChenWenKen
这个作者很懒,什么都没留下…
展开
-
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65537, result=0,
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65537, result=0,原创 2024-03-18 13:44:34 · 344 阅读 · 0 评论 -
nginx: [emerg] open() “/etc/nginx/fastcgi.conf“ failed (2: No such file or directory) in /etc/nginx/
nginx: [emerg] open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory) in /etc/nginx/原创 2024-02-05 13:45:34 · 437 阅读 · 0 评论 -
idea新建springboot项目直接修改application.properties为application.yml报错
idea新建springboot项目直接修改application.properties为application.yml报错原创 2024-02-03 15:52:59 · 267 阅读 · 0 评论 -
idea出现 version of Java 17 is not supported by the project SDK ‘1.8‘. Either choose a lower version
version of Java 17 is not supported by the project SDK '1.8'. Either choose a lower version原创 2024-02-02 15:36:50 · 3694 阅读 · 5 评论 -
vue项目ERROR TypeError: Cannot set properties of undefined (setting ‘chunkLoading‘)
vue项目ERROR TypeError: Cannot set properties of undefined (setting 'chunkLoading')原创 2024-02-01 08:32:37 · 434 阅读 · 0 评论 -
centos系统下,docker安装sqlserver并用本地Navicat连接
centos系统下,docker安装sqlserver并用本地Navicat连接原创 2023-11-24 15:07:08 · 795 阅读 · 0 评论 -
uwsgi+django启动服务出现静态文件404
uwsgi+django启动服务出现静态文件404原创 2023-02-08 15:30:43 · 460 阅读 · 0 评论 -
AttributeError: module ‘importlib_metadata‘ has no attribute ‘MetadataPathFinder‘
AttributeError: module 'importlib_metadata' has no attribute 'MetadataPathFinder'原创 2023-02-02 15:50:05 · 2972 阅读 · 1 评论 -
Try to run this command from the system terminal. Make sure that you use the correct version of ‘pip
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip原创 2022-12-10 09:49:35 · 368 阅读 · 0 评论 -
fitz执行报错
fitz转载 2022-06-15 15:59:23 · 556 阅读 · 0 评论 -
pycharm文件中英文变奇怪的文字
pycharm原创 2022-06-14 09:32:55 · 1285 阅读 · 0 评论 -
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
问题分析:python没有安装mysql驱动或映入mysql模块。解决步骤:一,安装mysql驱动,打开cmd.pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ pymysql二,在django项目下的setting.py下进行配置。# Database# https://docs.djangoproject.com/en/4.0/ref/settings/#databasesDATABASES = { 'defa原创 2022-03-28 16:56:06 · 12723 阅读 · 0 评论 -
TemplateDoesNotExist
问题:在DIRS设置路径[os.path.join(BASE_DIR,‘templates’)],但是浏览器访问时没找到templates这个路径。问题分析:在‘DIR’的设定中,‘template’是绝对路径,所以也要把包添加到路径中,‘DIRS’: [os.path.join(BASE_DIR,‘polls/templates’)]。...原创 2022-03-24 18:02:41 · 132 阅读 · 0 评论 -
module ‘sysconfig‘ has no attribute ‘_get_default_scheme‘. Did you mean: ‘get_default_scheme‘?
问题:在python的sysconfig的模块没有’_get_default_scheme’这个方法。解决:在python安装路径下的lib中打开sysconfig.py这个文件,并把里面的’get_default_scheme’改为’_get_default_scheme’。原创 2022-03-18 10:04:18 · 13334 阅读 · 10 评论 -
TypeError: not enough arguments for format string
报错内容:没有足够的参数用于格式化字符串。f1 = 2f2 = 2for i in range(22): print('%12ld,%12ld' %f1 %f2,end=' ') if(i % 3 ==0): print() f1 = f1 + f2 f2 = f1 + f2这样的写法相当于以下,f2无法输出print(('%12ld,%12ld' %f1) %f2,end=' ')正确写法:print('%12ld,%12ld' %(f1,原创 2022-03-16 08:25:32 · 951 阅读 · 0 评论 -
python保存excel防止科学计数法出现
解决方法:把整形转换成字符串类型再存储。问题出现:输入整形保存到excel用科学计数法记录。问题解决:把整形转换成字符串。原创 2022-03-14 10:05:52 · 2130 阅读 · 0 评论 -
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your PATH.
问题描述:要用python提取图片中的文字,安装了pytesseract,报了tesseract没有安装或没有添加路径的错误from PIL import Imageimport pytesseractimage = Image.open(r'C:\Users\user\Desktop\Test\pdfTest\1.jpg') #打开图片text = pytesseract.image_to_string(image) #图片转字符串print(text) #测试结果问题解决:一,下载安装T原创 2022-03-08 17:19:47 · 853 阅读 · 0 评论 -
ERROR: No matching distribution found for PIL
问题分析:找不到PIL相关的版本。问题解决:用pip安装的包名是pillow,用pycharm导入的包名为PIL。这还是挺让人奇怪,虽然是pillow包,但是用PIL导入项目。查了下资料,说明Pillow是PIL的一个派生分支,但如今已经发展成为比PIL本身更具活力的图像处理库。...原创 2022-03-08 14:45:39 · 4493 阅读 · 0 评论 -
IndentationError: unexpected indent
问题分析:掉浅坑了,python的缩进是用来界定代码块的,相当于其他编程语言的花括号,下列代码for循环没顶格就报错。 for i in range(1,10): for j in range(1,i+1): print(str(j) + '*' + str(i) + '=' + str(j*i), end=" ") print()问题解决:第一个for循环顶格。for i in range(1,10): for j in ran原创 2022-03-08 08:52:49 · 610 阅读 · 1 评论 -
KeyError: ‘Worksheet sheet does not exist.‘
原因分析:要从excel文件获取的sheet不存在。for n in N1: name = n[n.index('R'):n.index('-数量')] re = load_workbook(path2+'1.xlsx') re.save(path2+'2.xlsx') rb = re['sheet'] print(rb)问题解决:修改rb = re[‘sheet’]里的’sheet’,改成与excel里sheet一致的名称。 rb = re['Shee原创 2022-03-03 14:29:06 · 10452 阅读 · 0 评论 -
No module named SimpleHTTPServer
问题分析:cmd启动python服务时没有找到SimpleHTTPServer这个模块python -m SimpleHTTPServer 8000问题解决:在python安装路径下,lib文件下找到http文件夹,里面有server.py文件。python -m http.server原创 2022-03-01 10:14:00 · 3629 阅读 · 1 评论 -
TypeError: can only concatenate str (not “list“) to str
问题分析:字符串只能和字符串连接,不能与数组连接。#获取pdf文件名称并截取图片for dirs in RP_DIRS_ARR: for root,dirs,files in os.walk(FEILE_ADDR+NOW_DAY+'\\'+RP_DIRS_ARR): pdf_arr = [] for str in files: if(str[-3:]=='pdf'): pdf_arr.append(str)原创 2022-02-28 15:52:43 · 679 阅读 · 0 评论 -
TypeError: ‘generator‘ object is not subscriptable
问题分析:‘generator’对象没有下标,数组可以有下标。import osprint(os.walk(r'C:\Users\user\Desktop\Test')[0])解决方法:可以把下标去掉,然后再用for循环依次取出数据。import osfor root,dirs,files in os.walk(r'C:\Users\user\Desktop\Test'): print(dirs)...原创 2022-02-26 10:19:29 · 956 阅读 · 0 评论 -
SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX
原因分析:python的\有转义的含义,所以读取的路径有误import osos.walk('C:\Users\user\Desktop\Test')解决方法:1,在路径前面加r,防止字符转义。import osos.walk(r'C:\Users\user\Desktop\Test')2,用双斜杆,读取输出一个反斜线。import osos.walk(r'C:\\Users\\user\\Desktop\\Test')...原创 2022-02-25 15:49:01 · 353 阅读 · 0 评论