Sorry if this question sounds stupid as this is my first time using PythonAnywhere. The answer may seem obvious but I cannot help myself. If any bright minds here can help me, I would be really grateful to them.
I have a python script that is assigned to Scheduled Task. It is importing the functions from its sibling directory by accessing the parent directory as follows:
|_app
|_products
|_controllers.py => defines method delete_products, insert_products
|_cron
|_ __init__.py => from app.products.controllers import delete_products, insert_products
The script in question that is assigned to Scheduled Task is app/cron/__init__.py.
It is throwing the error as below:
Traceback (most recent call last):
File "/home/flask_app/flask_app_backend/app/cron/__init__.py", line 7, in <module>
from app.products.controllers import delete_products, insert_products
ModuleNotFoundError: No module named 'app'
Is there anything I am missing?