How to specify that Render should include templates-folder when deploying a flask app?

Hi, I have recently tried to deploy my flask blog that includes some templates on Render but the logs keep saying:

[2024-02-22 16:07:05,502] ERROR in app: Exception on / [GET]
raise TemplateNotFound(template)

Feb 22 05:07:05 PMjinja2.exceptions.TemplateNotFound: home.html

I have ensured that the home file is in the right directory and everything works fine when I try on my local in debug mode. How can I make it work on Render?

Btw, It says that the site is “Live” but when I access it, I get this:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Keep in mind that everything works fine when I run my script locally with debug=True

Thanks in advance!



This would be a code configuration issue and not a Render one. I’m not a Flask expert, so I searched for “TemplateNotFound: home.html”, it seems this StackOverflow post had a similar error:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.