Flask throws jinja2.exceptions.TemplateNotFound unless ran directly from the app.py folder

Viewed 23

When I run my app via a command like this:

admluk@app1:~$ python /usr/local/src/projects/my/my_web/src/app.py

My app throws the TemplateNotFound error, even though template is there, and it's in the correct templates folder.

But if I go into the folder first, via cd comand, and run the app like this:

admluk@app1:/usr/local/src/projects/my/my_web/src$ python app.py

Then there are no issues. Is this expected behaviour?

0 Answers
Related