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

1 comment
Comment actions Permalink

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

0

Please sign in to leave a comment.