10 2022 档案

摘要:1、场景 从接口读取数据写入文件时,在文件中显示的是Unicode字符 2、处理方法 import json def read_json_file(file_path): try: with open(file_path, mode='r', encoding='utf-8') as fp: res 阅读全文
posted @ 2022-10-26 10:06 代码诠释的世界 阅读(964) 评论(0) 推荐(0) 编辑
摘要:1、官网 官网http://www.squid-cache.org/linux 2、代理服务器 正向代理:客户端(内网) >squid >服务器centos 反向代理:服务器 >squid >客户端(内网) 3、dockerhub https://hub.docker.com/r/ubuntu/sq 阅读全文
posted @ 2022-10-25 22:51 代码诠释的世界 阅读(4335) 评论(0) 推荐(1) 编辑
摘要:1、场景 自动化测试中,需要将一些接口自动的写入到yaml中, 但是发现文件中显示的是Unicode字符 2、处理方法 import yaml def load_yaml_data(file_path): try: with open(file_path, 'r', encoding='utf-8' 阅读全文
posted @ 2022-10-25 21:02 代码诠释的世界 阅读(317) 评论(0) 推荐(0) 编辑
摘要:1、国内各大yum源 阿里源 https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11G5ZGvj 2、备份本机yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/y 阅读全文
posted @ 2022-10-23 13:27 代码诠释的世界 阅读(935) 评论(0) 推荐(0) 编辑
摘要:1、问题 python调用grpc接口报错 2、原因 由于更新了代码,proto文件没有重新build生成 3、重新build方法 python -m grpc_tools.protoc --python_out=./tools/ --grpc_python_out=./tools/ -I. ./p 阅读全文
posted @ 2022-10-08 16:21 代码诠释的世界 阅读(24) 评论(0) 推荐(0) 编辑
摘要:1、pypi https://pypi.org/project/pyqtgraph/ 2、安装 pip install pyqtgraph 阅读全文
posted @ 2022-10-08 16:15 代码诠释的世界 阅读(463) 评论(0) 推荐(0) 编辑
摘要:1、安装 sudo apt-get install stress sudo apt-get install stress-ng 2、查看cpu,内存,硬盘方法 # 查看cpu个数 cat /proc/cpuinfo # 查看内存大小 cat /proc/meminfo # 查看磁盘大小 df -h 阅读全文
posted @ 2022-10-01 16:24 代码诠释的世界 阅读(14487) 评论(0) 推荐(0) 编辑
摘要:1、问题 使用netstat报错command not found 2、处理 主要是因为没有安装 yum install net-tools 参考链接: https://blog.csdn.net/huangbaokang/article/details/88417221 阅读全文
posted @ 2022-10-01 16:03 代码诠释的世界 阅读(681) 评论(0) 推荐(0) 编辑
摘要:1、问题 做接口测试自动化时,参数传递时,默认给的null,直接写None会被解析成字符串 2、出问题的格式 打印 “Total': 'None' 3、正确的解析成None的方法 方式一,后面留空 输出 方式二、写成 null 输出 方式三、写成 ~ 输出 参考链接: https://blog.cs 阅读全文
posted @ 2022-10-01 16:00 代码诠释的世界 阅读(330) 评论(0) 推荐(0) 编辑
摘要:1、问题 rpc接口在调用的时候报错 2、原因 这个报错的意思就是int转换时,转换的对象不能调用 本次错误,主要是因为int(obj.a) 写成了int(obj.a()), 导致属性获取失败 3、处理 修改int(obj.a())为int(obj.a) 即可 本质上int转换的对象也就是那字符串, 阅读全文
posted @ 2022-10-01 15:43 代码诠释的世界 阅读(461) 评论(0) 推荐(0) 编辑
摘要:1、安装 sudo apt-get update sudo apt-get install -y linux-tools-$(uname -r) sudo apt-get install stress 2、命令介绍 stress --help `stress' imposes certain typ 阅读全文
posted @ 2022-10-01 15:28 代码诠释的世界 阅读(6668) 评论(0) 推荐(0) 编辑

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