标签:sequence codec ror odi byte func pen encoding error
1、文件的读写
with open("E:/python/sele_lianxi/function.py",‘r‘, encoding=‘UTF-8‘) as file:
content.send_keys(file.read())
也可写成open("E:/python/sele_lianxi/function.py"),
但有时会报错UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa6 in position 554: illegal multibyte sequence
标签:sequence codec ror odi byte func pen encoding error
原文地址:https://www.cnblogs.com/hzgq/p/9887150.html