0

code from flask import Flask, render_template

app = Flask(name)

@app.route("/") def index(): return render_template("index.html")

created a folder called template in the same folder where this coded file is and inserted the index.html file in the render template folder. The application did run and provide an the ip address but was throwing 500 internal error.

Similarly another one having the same issue. code:- from flask import Flask, render_template

app = Flask(name)

@app.route("/") def index(): headline = "Hello !" return render_template("index 1.html", headline=headline) inside the same template folder i have my index and index 1 file http://127.0.0.1:5000/ Error- 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. Kindly let me know what could be the possible solution for this

Also at times the code throws an unexpected error called the cannot import name and does not run

2
  • try calling it templates folder
    – Ojou Nii
    May 31 '20 at 9:55
  • If "there is an error in the application" there will be a traceback in the flask terminal that would give error detail. May 31 '20 at 16:14

You must log in to answer this question.

Browse other questions tagged .