lxml error, I can't pass string with Symbol into lxml

Viewed 104

I'm trying to pass the string "<p>abc</p>" into lxml:

import lxml
from lxml import html

str = "<p>abc</p>"
doc = lxml.html.fromstring(str)

But it comes out with this error message:

lxml.etree.ParserError: Document is empty
0 Answers
Related