源代码:
with open(config_file, "w", encoding="utf8") as f:
with codecs.open(input_file, "r", "utf8") as f:运行报错:
原因:别人的版本与自己的版本不同,所以导致出错
解决办法:将“w”改为“wb”;同时“r”改为“rb”
with open(config_file, "wb", encoding="utf8") as f:
with codecs.open(input_file, "rb", "utf8") as f: