【发布时间】:2018-10-19 12:04:58
【问题描述】:
以下代码来自“用于数据分析的 Python”:
from io import StringIO
import io
tag = '<a href="http://www.google.com">Google</a>'
root = objectify.parse(io.StringIO(tag).getroot())
执行代码会产生以下错误:
TypeError: initial_value must be unicode or None, not str
请帮忙!
【问题讨论】:
标签: html xml lxml lxml.objectify