Visual Studio Code – Python relative imports do not work in VS Code but do in PyCharm
I'm trying to import db/connectdb.py in model/task.py, both model and db folder are in the main project folder. When I try from db.connectdb import ConnectDb I get ModuleNotFoundError: No module named 'db' When I try from ..db.connectdb import ConnectDb I…