I have a circular dependency problem. In the direction /path/to/src, there are 2 files a.py and b.py.
In a.py, there is a
from . import b
and in b.py, there is a
from . import a
So there's a circular dependency. Based on How to avoid circular imports in Python?, one way to resolve this is to use absolute imports, so I tried
In a.py:
import path.to.src.b as b
and in b.py, there is a
import path.to.src.a as a
But I still get the circular dependency error during execution
module 'path.to.src.a' has no attribute 'b'