A get an error when trying to run my code but somehow vs code doesn't see the path error.
The error:
ModuleNotFoundError: No module named 'get_formats'
The structure of my code is:
application
├── data_processor
│ ├── extract_movements.py
│ └── get_formats
│ └── get_formats.py
├── get_user_input
│ ├── get_bank_name.py
│ └── get_pdf_name.py
└── operate.py
And the error occures in extract_movements.py
where I am trying to import a funtion located in get_formats.py
using:
from get_formats.get_formats import get_transaction_tags_format, get_transaction_dates_format
The complete error shown is:
Traceback (most recent call last):
File "/Users/username/Desktop/application/operate.py", line 6, in <module>
from data_processor.extract_movements import extract_movements
File "/Users/username/Desktop/application/data_processor/extract_movements.py", line 1, in <module>
from get_formats.get_formats import get_transaction_tags_format, get_transaction_dates_format
ModuleNotFoundError: No module named 'get_formats'
I see some answers talk about an __init__.py
file in the application directory or the data_processor directory so i tried adding that but got no results. Also have no idea what an empty file with the name __init__.py