This is my first time trying to import from different folder. the structure is as follow:
application
│
├── __init__.py
│
├── folder
│ ├── file.py
│
└── __init__.py
│
└── folder2
├── some_file.py
│
└── __init__.py
I want to import some_file to file.py
I tried to do from application.folder2 import some_file
, and it doesn't work:
ModuleNotFoundError: No module named 'application'.
Note : Visual code is recognizing the folders as modules, therefore I get the error only in run time.
I followed this answer link, which was the most suitable to me.
What is wrong here?