python – I am getting the error Response object has no attribute fromstring
Dont nest functions like this. Un-nest your function and it will work fine.
html = requests.get(*)
What this returns is a response object.
In your nested function youre using this
html instead of what you imported
from lxml import html because of the namespace(s).