How to Solve NameError: name 'enum' is not defined

Solution: Import the 'enum' module

# Add the following line to the top of your code
import enum

 

For more information:
Python enum