I am having directory structure as
-Practice
-Connect
-connect.py -> having function abc
-__init__.py
-Pytest
-__init__.py
-file.py
file.1 contents
from ..connect.connect import abc
abc()
Getting error as
ValueError: attempted relative import beyond top-level package
I can use import from parent directory as
from connect.connect import abc
abc()
This is working. Need to know why relative import is not working
As people suggested i have added init.py in Practice directory and still getting same error