I am running a script in many folders and subfolders, the structure is kinda confusing but it basically is like:
src/
controllers/
__init__.py
a.py
b.py
models/
__init__.py
c.py
__init__.py
main.py
The ^^^ is supposed to be the red error underline, main.py looks something like:
from controllers import a
^^^^
import models.c
^^^^^^
a.py:
import models.c
^^^^^^
I tried both, from and regular import, because maybe only one is bugged, but no, in VSC at every place I import like this, it tells me unable to import [directory] (it still runs from VSC and from the terminal via python3 main.py)
Things I tried
- Restarting VSC
- Rebooting my PC
- Changing stuff in
__init_.py(yet nothing systematic, just playing around)
Is this a visual studio code issue, is it bad importing? Should I put stuff into __init__.py? Can I supress this issue or fix it somehow else?


