if my code compiles properly, why won’t it run my Flask application? /u/notburneddown Python Education

so I am working on this flask program for the flask course I am doing. Something about my configurations is different from what the instructor of this Udemy course assumes. My code runs but there’s an issue with Flask. I did everything he said in the video but when I enter the `flask run` command, it doesn’t do anything.

greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ export FLASK_APP=app.py greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ flask run Usage: flask run [OPTIONS]Try 'flask run --help' for help.Error: Failed to find Flask application or factory in module 'app'. Use 'app:name' to specify one. greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ /bin/python "/home/greg/Documents/Python/Flask Course/Project 1: Microblog/app.py 

Here is a link to the video course:https://www.udemy.com/course/web-developer-bootcamp-flask-python/learn/lecture/23393565#content I’m on lecture 100.Can someone help me out here? I’m not using Windows I’m using Ubuntu btw.

Here is my code:

from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): return "Hello, world!" 

submitted by /u/notburneddown
[link] [comments]

​r/learnpython so I am working on this flask program for the flask course I am doing. Something about my configurations is different from what the instructor of this Udemy course assumes. My code runs but there’s an issue with Flask. I did everything he said in the video but when I enter the `flask run` command, it doesn’t do anything. greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ export FLASK_APP=app.py greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ flask run Usage: flask run [OPTIONS]Try ‘flask run –help’ for help.Error: Failed to find Flask application or factory in module ‘app’. Use ‘app:name’ to specify one. greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ /bin/python “/home/greg/Documents/Python/Flask Course/Project 1: Microblog/app.py Here is a link to the video course:https://www.udemy.com/course/web-developer-bootcamp-flask-python/learn/lecture/23393565#content I’m on lecture 100.Can someone help me out here? I’m not using Windows I’m using Ubuntu btw. Here is my code: from flask import Flask app = Flask(__name__) @app.route(“/”) def hello_world(): return “Hello, world!” submitted by /u/notburneddown [link] [comments] 

so I am working on this flask program for the flask course I am doing. Something about my configurations is different from what the instructor of this Udemy course assumes. My code runs but there’s an issue with Flask. I did everything he said in the video but when I enter the `flask run` command, it doesn’t do anything.

greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ export FLASK_APP=app.py greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ flask run Usage: flask run [OPTIONS]Try 'flask run --help' for help.Error: Failed to find Flask application or factory in module 'app'. Use 'app:name' to specify one. greg@Windows:~/Documents/Python/Flask Course/Project_1_Microblog$ /bin/python "/home/greg/Documents/Python/Flask Course/Project 1: Microblog/app.py 

Here is a link to the video course:https://www.udemy.com/course/web-developer-bootcamp-flask-python/learn/lecture/23393565#content I’m on lecture 100.Can someone help me out here? I’m not using Windows I’m using Ubuntu btw.

Here is my code:

from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): return "Hello, world!" 

submitted by /u/notburneddown
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *