How to Solve NameError: name 'foobar' is not defined -- bar

Solution: Import the 'foobar' module

To Solve the error, add the following line to the top of your code.

from bar import foobar

 

For more information:
Python bar foobar