Python运行过程报错解决
文章平均质量分 51
Python 运行过程中的一些报错
懒笑翻
这个作者很懒,什么都没留下…
展开
-
WebDriverException( selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executabl
在保存pyechars结果为图片时报错了:rom snapshot_selenium import snapshot as drivermake_snapshot(driver, bar_chart().render(), "bar.png")WebDriverException( selenium.common.exceptions.WebDriverException原创 2022-07-26 19:56:14 · 527 阅读 · 3 评论 -
Empty suite
因为test_ 或者 _test 会使得程序认为你这个是做自动化测试的测试用例文件,比如你是test_A,把下划线去掉就可以了testA,然后就可以正常运行了。因为这个,所以在运行这个python文件的时候报错Empty suite。‘test_’开头或者‘_test’结尾。‘test_’开头或者‘_test’结尾。代码中使用了main函数调用类中的内容。也就是类开头是Test 或 Suite。方法名是 test_ 或 check_文件名是 test_ 或 _test。...原创 2022-08-06 21:54:02 · 9950 阅读 · 0 评论 -
Server returns invalid timezone. Go to Advanced tab and set serverTimezone property manually.
Django3.0链接MySQL的时候报错Serverreturnsinvalidtimezone.Goto'Advanced'tabandset'serverTimezone'propertymanually.提示的内容是:Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.译文:服务器返回无效时区。进入“Ad...原创 2020-05-24 19:23:27 · 4394 阅读 · 0 评论 -
Error loading MySQLdb module.Did you install mysqlclient
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie解决方法是:File--Settings--Project:**--Project Interperter ,点击旁边+号Add搜索mysqlclient,INSTALL PACKAGE 即可原创 2020-05-25 09:28:43 · 557 阅读 · 0 评论 -
Django3.0 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required
Django3.0 :django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.译文:django.core.exceptions。需要mysqlclient 1.3.13或更新版本;你有0.9.3。 File "C:\Users\Acer\AppData\Local\Programs\Python\StudeyDjango\lib\si...原创 2020-05-24 23:45:32 · 809 阅读 · 0 评论 -
Python 运行报错 PermissionError: [Errno 13] Permission denied: '***.***'
PermissionError: [Errno 13] Permission denied: 'info.csv'翻译:访问错误:没有权限,拒绝访问:'info.csv'这乍一看我还真摸不着头脑哪里出问题了。然后铁憨憨错在...原创 2020-02-20 21:50:34 · 10972 阅读 · 0 评论 -
Python 'NoneType' object is not subscriptable , 获取到的数据为None,需要保留数据
爬取豆瓣电影数据的时候,在获取内容的时候出现'NoneType' object is not subscriptable检查了一下,发现是因为id为1292061这一条数据中我获取的某一块数据有为空的...原创 2020-04-14 11:35:41 · 16431 阅读 · 0 评论 -
升级pip超时 python -m pip install --upgrade pip 报 socket.timeout: The read operation timed out
升级pip超时 python -m pip install --upgrade pip 报 socket.timeout: The read operation timed outC:\Users\Acer>python -m pip install --upgrade pipCollecting pip Downloading pip-20.2.2-py2.py3-none-any.whl (1.5 MB) |████ |.原创 2020-09-01 17:37:30 · 1089 阅读 · 0 评论 -
from PIL import Image 报错
选择Install package **发生错误,是因为我没有安装PIL1、Win + R , 输入cmd 进入,输入:pip install pillowpip install image下载完成再回到 Pycharm , Install package **,发现还是报错,接下来我们需要2、打开File -- Settings -- Proje...原创 2020-01-20 20:00:24 · 41001 阅读 · 5 评论 -
Python中执行 MySQL插入语句报错 :1064, "You have an error in your SQL syntax;
Python MySQL 插入语句(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Darabont,弗兰克·德拉邦特,http://i...原创 2020-04-14 00:32:19 · 4312 阅读 · 0 评论 -
AttributeError: module ‘jieba‘ has no attribute ‘analyse‘
在代码中使用了:jieba.analyse。AttributeError: module 'jieba' has no attribute 'analyse'原创 2023-05-03 22:36:48 · 1617 阅读 · 0 评论 -
Python 中 SyntaxError: invalid syntax
SyntaxError: invalid syntax语法错误 : 无效的语法1、def 、class、 if 、 elif 、 for 、 while 等语句末尾没有加上 “ : ” 关键符号,2、赋值运算符和比较运算符的混合 比如:if 后是 == 而不是 = ,当然这一点在pycharm中就直接有提示错误了3、~~~~~~~~~...原创 2020-02-07 16:34:31 · 545 阅读 · 0 评论 -
pip install face_recognition 报错的解决
最开始我是用的 pip install face_recognition 报下载超时,然后我想着去下载whell离线包,可是这玩意居然没有然后我就想着超时的话,那咱就设置一下默认的超时时间吧,然后直接飞出下面的错:这是我在cmd 运行pip --default-timeout=600 install face_recognition 报错的:跟着提示,我们来到链接:比如我这里提示下载的是 face-recognition-models。原创 2022-08-19 18:42:21 · 1311 阅读 · 0 评论 -
GET /static/css/bootstrap.min.js.map HTTP/1.1“ 404GET /static/css/bootstrap.min.css.map HTTP/1.1“404
GET /static/css/bootstrap.min.js.map HTTP/1.1" 404GET /static/css/bootstrap.min.css.map HTTP/1.1" 404原创 2023-05-11 09:42:45 · 1103 阅读 · 2 评论 -
MEDIA_ROOT设置时报错unresolved reference
MEDIA_ROOT设置时报错unresolved reference原创 2023-04-30 20:23:48 · 238 阅读 · 0 评论 -
u_name.innerText is not a function
u_name.innerText = "插入的内容"u_name.innerText("插入的内容")原创 2023-05-15 21:49:03 · 195 阅读 · 0 评论 -
升级 pip : python -m pip install --upgrade pip,socket.timeout: The read operation timed out 加入超时处理方法
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command.警告:您正在使用pip 19.3.1版本;但是,版本20.0....原创 2020-01-29 17:19:00 · 17725 阅读 · 4 评论 -
No matching distribution found for cv2 ModuleNotFoundError: No module named ‘skbuild‘
目录前言:朋友运行报错:No matching distribution found for cv21、不能直接pip install cv2 ,请运行下方命令2、用清华的镜像快3、然后发现又出现了问题,不过总体是可以运行了 运行截图如下4、新问题 ModuleNotFoundError: No module named 'skbuild' 的解决5、如果部分玩家出现如下报错可以对症解决 cmake1、不能直接pip install cv2 ,请运行下方命令没有科学网的话会发现下载有点慢,可原创 2023-03-31 17:16:40 · 1729 阅读 · 0 评论 -
pycharm创建django项目后Apps文件夹下没有model、admin、view等文件的解决办法
pycharm创建django项目后Apps文件夹下没有model、admin、view等文件,情况如下图所示。原创 2023-05-01 16:25:06 · 754 阅读 · 0 评论 -
RecursionError: maximum recursion depth exceeded
运行以下代码:def print(code): code += 1 print(code)print(1)报错: [Previous line repeated 983 more times]RecursionError: maximum recursion depth exceeded翻译:[前一行重复了983次]超过最大递归深度递归最大...原创 2020-02-07 19:34:32 · 1792 阅读 · 0 评论 -
python manage.py makemigrations ValueError: source code string cannot contain null bytes
我思前想后,后来来来回回折腾,我发现当我没有生成这个文件或者这个生成的文件不在项目里面的时候,是不会出现报错的。把models.py的内容全部复制到NotePad++中新建文件打开再保存再把这个文件去覆盖项目中的models.py,然后就可以了。生成的models.py文件不是utf-8的格式,就算在一行设置或者整个项目设置也无效的。把models.py文件在NotePad++中打开,并改为utf-8的格式,再重新保存。然后查看很多人的总结,说是删掉数据库,重新新建,然后我尝试了,还是不行。原创 2023-05-12 21:14:33 · 1400 阅读 · 5 评论 -
UnicodeEncodeError: 'gbk' codec can't encode character '\u2022' in position 178: illegal multibyte s
Python 获取LOL中所有英雄的传记时运行才下载三条数据就报错UnicodeEncodeError: 'gbk' codec can't encode character '\u2022' in position 178: illegal multibyte sequence解决方法:在 open 函数中加入:encoding='gb18030', errors='igno...原创 2020-01-13 21:28:16 · 4355 阅读 · 0 评论 -
安装bs4, 加入安装超时处理
1、在 cmd命令窗口 或者 pycharm中的Terminal 输入以下命令即可:pip install beautifulsoup42、如果碰到超时报错:(socket.timeout)G:\works\PythonCharmPre>pip install beautifulsoup4Collecting beautifulsoup4 Downloading ht...原创 2020-01-29 17:27:15 · 793 阅读 · 0 评论 -
pip install ** , 设置超时 timeout 时间
1、一般情况下 pip 安装什么包的时候都是 在cmd 命令窗口或者 pycharm 的 Terminal 窗口输入:pip install **** 是对应的包名2、有时候网络不好的情况会出现 socket.timeout 的报错,我自己找了个目前我个人觉得最简单的方法,就是把命令符修改一下:pip --default-timeout=600 install **** 是...原创 2020-01-29 17:34:30 · 13183 阅读 · 0 评论 -
import cv2 No module named ‘cv2‘
import cv2 No module named 'cv2' ERROR: Could not find a version that satisfies the requirement opencvERROR: No matching distribution found for opencv原创 2022-08-17 16:50:14 · 2224 阅读 · 1 评论 -
python manage.py migrate 创建表格报错 ‘DIRS‘: [BASE_DIR / ‘templates‘]TypeError: unsupported operand type
python manage.py migrate 创建表格报错 'DIRS': [BASE_DIR / 'templates']TypeError: unsupported operand type原创 2023-04-30 17:33:30 · 506 阅读 · 0 评论 -
python 向mysql插入数据时有单引号双引号报语法错误的解决
check the manual that corresponds to your MySQL server version for the right syntax to use near ',14-马斯切拉诺,7-迪马利亚(79',17-古铁雷斯);11-特维斯(69',8' at line 1。原创 2023-05-03 17:40:06 · 1331 阅读 · 0 评论 -
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.
Pycharm 连接MySQL数据库 Test Connection 时报错:Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.如下图所示:解决如下:1、打开MySQL数据库,在对应的数据库下新建查询,输入:set g...原创 2020-01-19 16:20:04 · 1056 阅读 · 0 评论 -
pymysql.err.ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that co
对于报错解析:很明显这是语法错误,我上看下看,左看右看,都没有看出问题来。在pycharm中执行报语法错误,但是我复制到mysql数据库去执行又是正常的。就很纳闷。原创 2023-04-26 14:46:03 · 9639 阅读 · 0 评论 -
AttributeError:partially initialized module ''has no attribute''(most likely dueto a circular import
给我自己笑死,这个错误:AttributeError: partially initialized module 'itchat' has no attribute 'auto_login' (most likely due to a circular import)1、我已经是确定导入了itchat了 pip install itchat2、报错翻译过来的结果就是...原创 2020-01-15 23:18:40 · 101630 阅读 · 133 评论 -
AttributeError: module ‘networkx‘ has no attribute ‘from_numpy_matrix‘
目录一、解决如下:二、错误分析:在使用TextRank4Keyword().analyze(text, lower=True, window=2)的时候报错:AttributeError: module 'networkx' has no attribute 'from_numpy_matrix'1、进入源码\Python\Python310\Lib\site-packages\textrank4zh\util.py2、定位到160行3、修改这一行代码4、再运行程序就可以了原创 2023-05-07 14:38:10 · 7687 阅读 · 1 评论