关于UnicodeDecodeError: 'gbk' codec can't decode byte的解决办法将with open(file) as f: 改成 with open(file, ‘r’, encoding=‘utf-8’) as f:就可以了。原文链接:https://blog.csdn.net/marselha/article/details/91872832