Python
Python学习
每天靠近一点点
这个作者很懒,什么都没留下…
展开
-
postman连接mysql报ETIMEDOUT错误解决方法
在cmd中执行xmysql -h localhost -u username -p password -d database命令后,报errorno: 'ETIMEDOUT’超时错误;原创 2023-11-02 17:52:38 · 518 阅读 · 0 评论 -
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
使用json.load()读取json文件,以下代码报错为json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)原因:M01.json文件无内容,为空文件。import jsonimport osdef test_stateInfo( ): path = os.path.join(os.getcwd(), 'Config\M01.json') with open(path, 'r',encodi原创 2022-04-18 20:25:00 · 518 阅读 · 0 评论 -
Python 邮件发送流程
一、发送普通文本步骤1、连接邮箱服务器,登陆邮箱。连接邮箱服务器:smtplib.SMTP_SSL(邮箱连接地址,端口号)163邮箱连接地址:smtp.163.comqq邮箱连接地址: smtp.qq.com端口号:465/25登陆邮箱:连接对象.login('qq/163账号’,授权码)#连接163邮箱服务器con = smtplib.SMTP_SSL('smtp.163.com', 465)#登陆邮箱con.login('[email protected]','xxxxx授权码xxx原创 2022-01-07 18:47:37 · 632 阅读 · 0 评论 -
smtplib.SMTPAuthenticationError: (535, b‘Error: authentication failed‘)
smtplib.SMTPAuthenticationError: (535, b’Error: authentication failed’)535 授权码填写错误解决方法:应该填写QQ授权码或163邮箱授权码,而不是自己的qq邮箱或163邮箱的账户密码。怎么去创建授权码呢?请访问:https://blog.csdn.net/qq_45328505/article/details/122115459...原创 2022-01-04 19:45:03 · 1465 阅读 · 0 评论 -
SMTPAuthenticationError: (550, b’User has no permission’)
一、常见问题1、SMTPAuthenticationError: (550, b’User has no permission’)550 没有开通授权码2、smtplib.SMTPAuthenticationError: (535, b’Error: authentication failed’)535 授权码填写错误原创 2022-01-04 19:40:29 · 2237 阅读 · 0 评论 -
pycharm终端运行pytest提示file or directory not found的解决办法
在PyCharm中运行pytest test_03.py文件,出现ERROR: file or directory not found: test_03.py,如下图所示:解决方法:将test_03.py文件直接放到PythonDemo目录下即可。原创 2021-10-27 20:01:58 · 10918 阅读 · 5 评论 -
allure‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件’
问题: allure‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件’解决方法:重新启动pycharm一、allure安装下载及环境变量配置首先安装JDK1.8,添加到环境变量path执行 pip install allure-pytest在官网下载allure链接: https://github.com/allure-framework/allure2/releases进入bin目录,双击运行allure.bat,启动allure;并将allure添加系统变量PATH二、检原创 2021-10-29 19:26:09 · 2986 阅读 · 0 评论