|
|
db.create_all()
; A% {( V' B; v, l* H# [6 ZTraceback (most recent call last):. R+ v, e0 }$ k
File "F:\Program Files\JetBrains\PyCharm Community Edition 2023.2.1\plugins\python-ce\helpers\pydev\pydevconsole.py", line 364, in runcode7 l, X; d" b0 ]) {; ~2 Q
coro = func()
- D/ U3 t1 y# D7 V$ Q' j' d4 R3 t ^^^^^^# X% a, o: Y/ D
File "<input>", line 1, in <module>( G" i9 E, \. {0 V: F
File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sqlalchemy\extension.py", line 900, in create_all
7 [9 k* }! j) g- b self._call_for_binds(bind_key, "create_all")' {( S. D& h6 D' z" i- ?
File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sqlalchemy\extension.py", line 871, in _call_for_binds
* I6 M/ B E* ?7 W engine = self.engines[key]
) s# _5 p: d1 m( x7 P* ~ ^^^^^^^^^^^^8 P$ J+ t4 a8 Z3 {
File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sqlalchemy\extension.py", line 687, in engines9 g7 H% Q& i# K5 b* m
app = current_app._get_current_object() # type: ignore[attr-defined]/ S$ I: L, ^% r% x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 x2 }7 }( a2 y! c4 R3 j, z File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\local.py", line 519, in _get_current_object
. Y* x) _8 ^2 v3 J y$ f) i raise RuntimeError(unbound_message) from None+ d: z0 N6 A9 f/ \ ~+ k
RuntimeError: Working outside of application context.
! ]# Y. U; g; N TThis typically means that you attempted to use functionality that needed2 {3 a! B, ?/ p
the current application. To solve this, set up an application context! n2 m& F4 r/ r! ^# M, F5 P8 r- p
with app.app_context(). See the documentation for more information.4 B! _( A: T1 p; l- I6 J
- ?# Q; D; g( M0 G
|
|