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

Solution: Import the 'colorlog' module

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

 

For more information:
Python colorlog