|
|
db.create_all(); L# ]; L4 h7 w" L P, j
Traceback (most recent call last):
* V9 E- t0 u& D' Y- b1 \ File "F:\Program Files\JetBrains\PyCharm Community Edition 2023.2.1\plugins\python-ce\helpers\pydev\pydevconsole.py", line 364, in runcode2 r8 i# X; A, ], x G- p' q
coro = func()5 y' L# @8 x) T
^^^^^^$ e! P6 w" W5 C6 \( z- S% C
File "<input>", line 1, in <module>
! ^& h0 t! n% ? File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sqlalchemy\extension.py", line 900, in create_all
' A: l9 L& J6 D R& w self._call_for_binds(bind_key, "create_all")& K) m. d. ^: _/ ]4 {9 o$ J
File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sqlalchemy\extension.py", line 871, in _call_for_binds8 Z7 l9 l5 q1 Y& \
engine = self.engines[key]
* Q( M: t$ s+ K. o4 ^0 h" A ^^^^^^^^^^^^
" u. ]: D; ^" H" ?3 ?) V: @* X File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sqlalchemy\extension.py", line 687, in engines2 @% _' l* L* n
app = current_app._get_current_object() # type: ignore[attr-defined] ]! _5 i9 P1 o2 e6 u( Y* W
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
" Q- Q3 b% }+ { G File "G:\Users\longrui\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\local.py", line 519, in _get_current_object
, f; J0 g( A- `* B7 K* [ raise RuntimeError(unbound_message) from None7 o/ n- w) i; u* Y9 M U$ o
RuntimeError: Working outside of application context.
: O- L% M/ s. m3 n5 _" c7 jThis typically means that you attempted to use functionality that needed! V0 {" q8 I0 f# \, Y
the current application. To solve this, set up an application context
& t4 O0 G! m5 u" h8 fwith app.app_context(). See the documentation for more information.0 r+ |( c' ^, ^8 s2 l; m$ N
% P7 {6 z) I. h0 B
|
|