Python Forum

Full Version: [split] flask 500 internal server error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I copy pasted the code to create a minimal application from the FLASK docs .
from flask import Flask

app =Flask(__name__)

@app.route('/')
def home():
	return "hello"

if __name__ == '__main__':
		app.run()	
I get the 500 internal server error for this . Pls help me !
Im extremely sorry i didnt know this ...Im new to this forum ..extremely sorry for the convenience
Can you show (or explain) how you're getting the 500? I copied the code as is, ran it, navigated to localhost:5000 in my browser and I got the expected response (a 200 with "hello" in the body).
(Nov-10-2021, 08:48 AM)ndc85430 Wrote: [ -> ]Can you show (or explain) how you're getting the 500? I copied the code as-is, ran it, navigated to localhost:5000 in my browser and I got the expected response (a 200 with "hello" in the body).
I guess there was some problem with the server itself.I tried back in the morning and the same piece of code worked perfectly as expected :)