python3 Non-UTF-8 code starting with '\xe7'

背景

python3 将含有中文的文本写入csv时,出现上述问题

解决方案

py文件开头加上

# -*- coding:utf-8 -*-
posted @ 2023-10-20 12:18  java渣渣  阅读(17)  评论(0编辑  收藏  举报