Import from other file in Pure Python project giving error because adds __main__

I made an empty 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

1 comment
Comment actions Permalink

Solved: delete the dot before dataClass. Seems to be the python 2 way


Please sign in to leave a comment.