Skip to content Skip to sidebar Skip to footer

Attributeerror: 'nonetype' Object Has No Attribute 'encode' With Lxml-python

I'm getting AttributeError: 'NoneType' object has no attribute 'encode' error when parsing out some XML patent inventor data. I'm trying to pull the first inventor plus their addre

Solution 1:

You could always just do quick and dirty str(inventor1.encode("UTF-8") if inventor1 else inventor1)


Post a Comment for "Attributeerror: 'nonetype' Object Has No Attribute 'encode' With Lxml-python"