Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
(env0) C:\Users\AS\OneDrive\Documents\Python Project 01>python run.py
Traceback (most recent call last):
File "C:\Users\AS\OneDrive\Documents\Python Project 01\run.py", line 1, in <module>
from flaskblog import app
ImportError: cannot import name 'app' from 'flaskblog' (C:\Users\AS\OneDrive\Documents\Python Project 01\flaskblog\__init__.py)

What I have tried:

I'm not sure how to solve it, so i haven't tried anything yet.
Posted
Updated 6-Dec-22 1:25am

Read the error message:
ImportError: cannot import name 'app' from 'flaskblog' 

Try
Python
from site.views import app
Instead.
 
Share this answer
 
Comments
Aalam Pratap Bedi 6-Dec-22 7:00am    
Can you be please be more precise about your suggestion. I'm very new to flask/python so I need more clarification on your suggestion. Thanks.
I suggest you go to Quickstart — Flask Documentation (2.2.x)[^] and work through the tutorial.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900