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

Solution: Import the 'my_module' module

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

from my_project import my_module

 

For more information:
Python my_project my_module