I fixed the error by adding jinja2==3.0.3 and werkzeug==2.0.3 in the requirements.txt. I used Flask old version. Its dependencies were broken. You can check container log for the error details.
Flask App shows ImportError: cannot import name 'Markup' from 'jinja2' | After deploying
Hello,
I have successfully deployed a flask web app on Azure using the GitHub repository with App Service Plan (B2: 3). When I click on the browse button it shows an Application Error page. On the diagnostic page, it shows a Container Crash error: Application Errors that may have caused the container to crash were detected.
And the App logs listed this error ImportError: cannot import name 'Markup' from 'jinja2'
My flask app used the PostgreSQL database, I have followed this tutorial Deploy a Python Django or Flask web app with PostgreSQL - Azure App Service | Microsoft Learn.
Anyone has suggestions I am struggling with this for two weeks!