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

Solution: Import the 'my_module' module

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

import my_module

 

For more information:
Python my_module