Python Forum
flask.cli.NoAppException: Could not import 'app'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flask.cli.NoAppException: Could not import 'app'
#2
Hi @kazu755 ,

No problem we will most certainly make your project run :)

I see a lot of bad Flask examples/tutorial on the WWW especially the launching part.

If you start with Flask I will recommend you to start from scratch with the official documentation
https://flask.palletsprojects.com/en/2.2.x/quickstart/

---
You should not put the HTML code in your .py Python/Flask file
Line 10 to 56. instead you want to use template file -->
https://flask.palletsprojects.com/en/2.2...-templates
You might find better documentation about Jinja "templating" (it's damn useful !)

---
You don't launch by Flask file.py

but trough Python

so either run.py (if python is associated with .py file)
or something like

cd C:\users\username\documents 
C:\something\Python\Python3.11.exe run.py
Cheer,
[Image: NfRQr9R.jpg]
Reply


Messages In This Thread
RE: flask.cli.NoAppException: Could not import 'app' - by SpongeB0B - Dec-28-2022, 06:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Flask_table module compatibility issue: cannot import name 'Markup' from 'flask' venkateshbalagiri 1 848 Mar-22-2024, 05:07 AM
Last Post: venkateshbalagiri

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020