- 积分
- 16844
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2024-5-28 13:56:24
|
显示全部楼层
访问报错信息:. E( a- Z- F( S
flask.cli.NoAppException% {1 V# V9 R8 z, D: Y
4 y K$ H5 y$ _/ b' B
flask.cli.NoAppException: Could not import "app".
# ^0 Q& m2 y, p c; {0 n6 `Traceback (most recent call last)
: o7 E) j+ N$ Y# z: }) [
~$ R5 M8 r; b6 T* U: q File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 240, in locate_app
. ?. H7 m# A. z2 q1 I9 Q
* X9 `/ T7 j9 X0 j0 n __import__(module_name)" g7 g) ^4 V8 r; Q2 }* [1 d# L
1 Z( T7 u4 ?: A/ q8 l5 W7 N* X- `
During handling of the above exception, another exception occurred:. e! h1 ]2 M0 o2 D2 q* v: U
File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 338, in __call__9 G/ `$ T0 }8 {. d% m& q
1 j s y/ ]1 O self._flush_bg_loading_exception()- s0 D' g) c, E% ?& [: e
0 r2 a9 {1 G m5 |7 h5 L1 g1 H8 T5 V File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 326, in _flush_bg_loading_exception
6 @7 P F* j3 ~" ]9 S- K$ ~, i! x. ^! j9 ] G" I3 ?# o, p
reraise(*exc_info)& V5 g! ]8 W6 V$ |
- ?. ] C' s" n, Z8 H
File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\_compat.py", line 39, in reraise0 T5 m# a5 R8 t8 x
( Y* t, f- `- }: X* B raise value! B; Y" A! C9 O6 U8 e& N2 {) G! E" q
/ h& @6 e2 `8 y5 C File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 314, in _load_app5 Z# }$ V5 |) H
5 r7 x _ [* v0 r
self._load_unlocked()* v0 a. O+ r- H6 k
) @2 D0 A8 U/ k1 [( j. z- `9 v* ~6 C3 ~ File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 330, in _load_unlocked
" ?( @8 n7 {$ x& e, J: Y9 i
' |% {2 o9 I' B" |# c, j6 g9 S& W6 g' G self._app = rv = self.loader()
& y7 a% j1 _: x. r; y- ]: J
1 n7 E6 d f! K3 K File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 388, in load_app
1 A" F) u5 M0 e. S# _0 P1 G/ B) e
8 V+ q/ v+ _* d4 f app = locate_app(self, import_name, name)
7 S) ?6 [& v9 w0 ?! d9 s8 V. d& E* [8 Z4 h6 {" }
File "C:\Users\admin\Desktop\test_flask\venv\Lib\site-packages\flask\cli.py", line 250, in locate_app
3 K/ W3 l9 [# G* x, A4 W5 \, J/ K9 K1 x2 F" c
raise NoAppException('Could not import "{name}".'.format(name=module_name))
2 ] i6 R; V3 P6 O4 \5 D
$ _+ X! X+ V) i8 _/ S6 N flask.cli.NoAppException: Could not import "app".% Z; R$ p( u$ J+ p
# G# ^2 j+ N& s# ^3 u$ PThe debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
- n! b8 X' k, r4 _
9 j1 f7 m/ K! m B7 G5 c/ f8 kTo 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.
/ L0 K0 h2 k( o; o, f7 }+ p
2 S3 F+ j6 X, K, @You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:+ W+ X& a( k! ]3 i
0 Q) S- I Z, }
dump() shows all variables in the frame. ~$ \; M) G$ |0 e
dump(obj) dumps all that's known about the object3 c% y: C/ s' y. x* M4 ?
, w, H3 X0 t% B! s* @" @ h( B |
|