摘要: 问题: Jmeter 使用 jdbc 连接 Mysql 8.0.17, 出现 Cannot create PoolableConnectionFactory (Could not crCannot create PoolableConnectionFactory (Could not create 阅读全文
posted @ 2021-06-07 10:12 Aliwall 阅读(851) 评论(0) 推荐(0) 编辑
摘要: 问题: 用Excel保存csv格式后, 在Jemeter读取时使用utf-8 格式读取, 读取的值 中文出现乱码. 解决方案: 使用记事本打开csv文件, 保存为 utf-8 格式, 即可正常读取. 阅读全文
posted @ 2021-06-06 22:59 Aliwall 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 在 mysql进行 多表联合查询, 出现以下错误:[Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clausewhich is not functionally dependent on columns in GROUP BY 阅读全文
posted @ 2021-06-02 11:51 Aliwall 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Python 使用 xlrd 读取.xlsx Excel文件报错 raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')xlrd.biffh.XLRDError: Excel xlsx file; not su 阅读全文
posted @ 2021-05-29 10:45 Aliwall 阅读(813) 评论(0) 推荐(0) 编辑
摘要: PyCharm会默认使用自带的unittest框架来执行单元测试,不会执行main函数中的代码 解决方法: 1、点击PyCharm右上角的 Uittest in xxx.py下拉框. 2、点击Edit Configuration...,在弹出的对话框中,删除 unittests in xxxx.py 阅读全文
posted @ 2021-05-28 15:54 Aliwall 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1 import unittest 2 import requests 3 import urllib3 4 urllib3.disable_warnings() 5 import warnings # 解决错误 ResourceWarning: Enable tracemalloc to get 阅读全文
posted @ 2021-05-17 16:47 Aliwall 阅读(443) 评论(0) 推荐(0) 编辑
摘要: a = "1" b_name = "小牛牛" # 用 %s 代替一个参数 s 是字符串str的意思. print("my name is %s" %b_name) print("my name is %s and my age is %s years old." % (b_name, a)) # m 阅读全文
posted @ 2021-05-17 16:41 Aliwall 阅读(17) 评论(0) 推荐(0) 编辑
摘要: # 字典传参 token = 'ajkdakkfweids' name = "Jack" body = { 'aaa': '123', 'bbb': '567', 'token': token, #直接用变量代替参数, 注意参数是不需要引号的 'user': 'userid%s' %name # 参 阅读全文
posted @ 2021-05-17 16:40 Aliwall 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1 # 正则表达式 3 import re 5 a = "https://www.cnblogs.com/levia/p/14629386.html" 7 # 1 知道前后取中间. 取 14629386 8 htmlid = re.findall("/p/(.+?).html", a) 9 prin 阅读全文
posted @ 2021-05-17 16:35 Aliwall 阅读(45) 评论(0) 推荐(0) 编辑
摘要: # 常用 混合模式 mode r+ 读写混合模式. # 默认起始坐标为0,直接写入会覆盖原文件的内容. # 使用 f.seek(0,2) 把光标移到最后再进行写入操作. # f.read()读操作后光标会移到最后. # f.seek(0) # 0 代表从开文件头开始算起. seek(5,0)开头第5 阅读全文
posted @ 2021-05-17 16:33 Aliwall 阅读(612) 评论(0) 推荐(0) 编辑