Import from other file in Pure Python project giving error because adds __main__
I made an empty __init__.py in the folder
I made it a source directory
My code:
from .dataClass import ExcelColumnsToinclude
Gives the error:
No module named '__main__.dataClass'; '__main__' is not a package
Please sign in to leave a comment.
Solved: delete the dot before dataClass. Seems to be the python 2 way