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

Solution: Import the 'rollbar' module

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

 

For more information:
Python rollbar