|
|
楼主 |
发表于 2024-5-28 13:56:24
|
显示全部楼层
访问报错信息:( M1 ~' M8 _8 m, P% T+ a
flask.cli.NoAppException
^' o, r& T4 w- ^" L+ k1 M0 z% F" l8 ]5 @" t4 H9 N
flask.cli.NoAppException: Could not import "app".
2 c9 r" u( X* m, W! B5 g& L. mTraceback (most recent call last)& o1 X5 ~' q8 `8 I5 l7 V$ D. b7 m* t2 k
/ b8 [* G$ U r% A5 B. O4 i) ?
File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 240, in locate_app( I* _ q7 E/ g* ?7 G3 h: B7 L" ?
2 \, k: x2 l, M
__import__(module_name)# \7 S9 C! M+ v6 \2 f& p3 \
: `( F6 p% p+ }7 j# ^& y) z$ r1 v During handling of the above exception, another exception occurred:
3 D0 l* I) o* [5 K0 G8 O$ ]1 X File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 338, in __call__
! B; `# I: B& s, Z
# b' o" E$ i: l# L& Z self._flush_bg_loading_exception()& }$ q0 g( a6 @& X+ z7 G
* ^& l6 ]# m' ^* F
File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 326, in _flush_bg_loading_exception
2 U. L; g$ `, l. j1 u& J
( |% Q7 P. _2 x* N( e& v$ f reraise(*exc_info)- y. @2 _& E8 ]5 H, y \# d
" Y, ~+ m( K* a: \* E3 C File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\_compat.py", line 39, in reraise
( G3 F) L& v* t" K1 U/ \* \3 A- g1 L; \8 B
raise value( w- Q/ ^7 S2 h. S' f
. h& d) F$ D: z& d: P File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 314, in _load_app5 ]4 m/ P* I+ R
1 H' Y g% ]; |8 i. K self._load_unlocked()
7 Z5 R' M8 P4 j, H7 k" f& x
2 L( o+ K# |% ` File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 330, in _load_unlocked* m! x9 c; u Z# S! s7 _5 S$ j
- b/ Q! ^; o1 \2 I$ n- \ self._app = rv = self.loader()
; b1 R1 B9 {# e) b( M3 `5 s4 R% B$ w B2 }" M! _3 @
File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 388, in load_app
9 D1 ^% _5 Q2 C/ k# i. w. ^7 E
/ R4 [0 |; `7 L9 w1 k7 [ app = locate_app(self, import_name, name)5 j: w/ u# R& d
( x f* Y7 f( S6 W( w) | File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 250, in locate_app! y% O z# g0 k* h/ F$ G8 O9 R6 N
* n. U3 j' j7 ]* g3 y) t
raise NoAppException('Could not import "{name}".'.format(name=module_name))' x; q. t6 t: a
& S" }2 |9 D# K+ a( m
flask.cli.NoAppException: Could not import "app".
! K( e+ {7 }; s d2 Z2 _ d8 F8 R% n" h1 K
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.; @1 k- u! d5 |! y4 Q
( g: R9 `( Z& U- pTo switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
" i& w) }8 C) h! ^, g6 x4 t2 R- ^# `3 L- H
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:8 U p# n! S4 ?# V
" `2 q9 r. @# ]( w' _# |* C dump() shows all variables in the frame5 l1 V9 N" O* w
dump(obj) dumps all that's known about the object y- E2 V8 N# e0 J
) v/ k2 q+ d( l
|
|