会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
**绵绵羊**
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
12
下一页
2021年4月6日
Jmeter 之跨线程传参
摘要: 其他线程使用某个线程中提取的值,比如场景:客户端一直与服务端保持连接的同时进行其他业务操作 1.建立以下两个线程组,并添加相应业务接口 2.发送心跳时,需要token,在用户登录接口下添加提取器提取token 3.在用户登录接口下添加BeanShell后置处理程序 4.将提取的token使用__se
阅读全文
posted @ 2021-04-06 12:07 **绵绵羊**
阅读(114)
评论(0)
推荐(0)
2021年3月1日
python 之异常捕获及处理(try--except)
摘要: 在python中,至少有两类错误,一种是程序语法错误,一种是程序异常。 所谓的语法错误是指你未按规定格式书写导致的错误,如:定义函数时,括号后面要紧跟英文冒号,若缺失则不能识别与运行,并抛出 SyntaxError: invalid syntax错误 def exceptions() print("
阅读全文
posted @ 2021-03-01 19:31 **绵绵羊**
阅读(3421)
评论(0)
推荐(0)
2021年2月23日
(admin.E108) The value of 'list_display[0]' refers to 'productname', which is not a callable, an attribute of 'ProductAdmin', or an attribute or method on 'product.Product'.
摘要: models.py # 创建产品表 class Product(models.Model): productName = models.CharField('产品名称', max_length=64) # 产品名称 productDesc = models.CharField('产品描述', max
阅读全文
posted @ 2021-02-23 19:40 **绵绵羊**
阅读(544)
评论(0)
推荐(1)
ModuleNotFoundError: No module named 'MySQLdb'
摘要: 执行命令 python manage.py makemigrations时抛出以下错误 Traceback (most recent call last): File "D:\Program Files\Python\Python37-32\lib\site-packages\django\db\b
阅读全文
posted @ 2021-02-23 19:33 **绵绵羊**
阅读(1390)
评论(0)
推荐(0)
python 错误之TypeError: XXXXX() takes no keyword arguments
摘要: 举个例子: str1 = 'sunlightn' f = str1.rfind("n", __start=1, __end=2) print(f) 以上代码运行后出现: "D:\Program Files\Python\Python37-32\python.exe" D:/demo/str_1.py
阅读全文
posted @ 2021-02-23 19:19 **绵绵羊**
阅读(13491)
评论(0)
推荐(0)
django.db.migrations.exceptions.NodeNotFoundError: Migration apitest.0001_initial dependencies reference nonexistent parent node ('product', '0001_initial')
摘要: 执行python manage.py makemigrations时出现以下错误 D:\autotestplat>python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 21,
阅读全文
posted @ 2021-02-23 18:30 **绵绵羊**
阅读(2436)
评论(0)
推荐(0)
python 之字符串的使用
摘要: 在python中,字符串是最常用的数据类型,通常由单引号(' ')、双引号(" ")、三重引号(''' ''',""" """)引起来。 # 字符串的创建 str1 = "hello world" str2 = 'sunlight' str3 = '''On a new day, the sun r
阅读全文
posted @ 2021-02-23 18:25 **绵绵羊**
阅读(296)
评论(0)
推荐(0)
2021年1月6日
python 之excel文件读取封装
摘要: import os import xlrd PATH = lambda p: os.path.abspath( os.path.join(os.path.dirname(__file__), p) ) class ExcelData: def __init__(self, file, sheet="
阅读全文
posted @ 2021-01-06 09:34 **绵绵羊**
阅读(139)
评论(0)
推荐(0)
2021年1月5日
python之yaml文件读取封装
摘要: import os import yaml from yamlinclude import YamlIncludeConstructor YamlIncludeConstructor.add_to_loader_class(loader_class=yaml.FullLoader) # 用于yaml
阅读全文
posted @ 2021-01-05 20:00 **绵绵羊**
阅读(1168)
评论(0)
推荐(0)
python之实现文件的读写
摘要: 很早之前做自动化测试,并没有将测试数据与数据库关联,而是直接通过json、ymal、excel等文件管理的。那么怎么用python读写文件呢? 在操作文件前,都需要打开文件,打开文件用内置函数open() open函数 用于打开文件,创建一个file对象,常用格式为: open(file, mode
阅读全文
posted @ 2021-01-05 19:56 **绵绵羊**
阅读(592)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
12
下一页
公告