Closed newusername2022 closed 3 years ago
我在用通用模板的时候碰到了这个lxml.etree.SerialisationError: IO_ENCODER, 搜了一下,在parse_template.py的第35行的etree.tostring(temp)里面加了一个encoding='utf-8'解决了问题:
lxml.etree.SerialisationError: IO_ENCODER
parse_template.py
etree.tostring(temp)
encoding='utf-8'
open("test.html", "w", encoding="utf-8").write(etree.tostring(parse,encoding='utf-8').decode("utf-8"))
因为太短了就不提merge了
已修改
我在用通用模板的时候碰到了这个
lxml.etree.SerialisationError: IO_ENCODER
, 搜了一下,在parse_template.py
的第35行的etree.tostring(temp)
里面加了一个encoding='utf-8'
解决了问题:因为太短了就不提merge了