解决python读取文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 124: illegal multibyte sequence问题
示例代码:
with open(base_path + "\\config\\user.json",encoding='utf-8') as f:
data = json.load(f)
print(data)
效果:
优秀不够,你是否无可替代
软件测试交流QQ群:721256703,期待你的加入!!
欢迎关注我的微信公众号:软件测试君
![](https://www.cnblogs.com/images/cnblogs_com/longronglang/1061549/o_QQ%E6%88%AA%E5%9B%BE20190728134401.jpg)