07 2020 档案

 
python3操作pgsql报错:No operator matches the given name and argument type(s),You might need to add explicit type casts
摘要:python操作数据库时报错了,报错内容为“No operator matches the given name and argument type(s),You might need to add explicit type casts”,原因在于字段格式不正确。 举例: import psyco 阅读全文
posted @ 2020-07-27 17:28 _titleInfo 阅读(9692) 评论(0) 推荐(1) 编辑
str转换为dict报错"Expecting property name enclosed in double quotes"
摘要:str转换为dict时报错:"Expecting property name enclosed in double quotes",直接原因在于双引号"" str转dict常用方法是json.loads(str),但遇到双引号会报错转换失败。本文介绍另一种方法:ast.literal_eval(st 阅读全文
posted @ 2020-07-20 17:14 _titleInfo 阅读(4136) 评论(0) 推荐(0) 编辑
python接口自动化:requests的保持会话
摘要:在设计接口测试工具的时候,会涉及到的一个点是登录后保持会话。保持会话有几种方法,在java的HttpClient中可以通过CookieStore去实现,在python可以通过set_cookie方法将登录获取到的cookie写到本地,之后的接口再通过get_cookie获取本地文件中的cookie。 阅读全文
posted @ 2020-07-07 16:28 _titleInfo 阅读(1112) 评论(0) 推荐(0) 编辑
python:missing 1 required positional argument: 'self' 的error
摘要:问题描述: class test: def test01(self): pass if __name__ == "__main__": test.test01() 如上代码执行时会报错:missing 1 required positional argument: 'self' ,问题原因如下: 对 阅读全文
posted @ 2020-07-07 16:05 _titleInfo 阅读(20975) 评论(2) 推荐(1) 编辑

 

点击右上角即可分享
微信分享提示