How to Solve NameError: name 'ElementTree' is not defined -- xml

Solution: Import the 'ElementTree' module

# Add the following line to the top of your code
from xml.etree import ElementTree

 

For more information:
xml ElementTree