D:\QinMan\order>flask-sqlacodegen “mysql://root:123456@127.0.0.1/food_db?charse
t=utf8mb4” --tables user --outfile “common/models/User.py” --flask
Traceback (most recent call last):
File “f:\python\lib\runpy.py”, line 170, in run_module_as_main
"main", mod_spec)
File “f:\python\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "F:\python\Scripts\flask-sqlacodegen.exe_main.py", line 7, in
File “f:\python\lib\site-packages\sqlacodegen\main.py”, line 56, in main
metadata.reflect(engine, args.schema, not args.noviews, tables)
File “f:\python\lib\site-packages\sqlalchemy\sql\schema.py”, line 4208, in re
flect
with bind.connect() as conn:
File “f:\python\lib\site-packages\sqlalchemy\engine\base.py”, line 2209, in c
onnect
return self.connection_cls(self, **kwargs)
File “f:\python\lib\site-packages\sqlalchemy\engine\base.py”, line 103, in __
init
else engine.raw_connection()
File “f:\python\lib\site-packages\sqlalchemy\engine\base.py”, line 2307, in r
aw_connection
self.pool.unique_connection, _connection
File “f:\python\lib\site-packages\sqlalchemy\engine\base.py”, line 2276, in _
wrap_pool_connect
return fn()
File “f:\python\lib\site-packages\sqlalchemy\pool\base.py”, line 303, in uniq
ue_connection
return _ConnectionFairy._checkout(self)
File “f:\python\lib\site-packages\sqlalchemy\pool\base.py”, line 773, in _che
ckout
fairy = _ConnectionRecord.checkout(pool)
File “f:\python\lib\site-packages\sqlalchemy\pool\base.py”, line 492, in chec
kout
rec = pool._do_get()
File “f:\python\lib\site-packages\sqlalchemy\pool\impl.py”, line 139, in do
get
self._dec_overflow()
File “f:\python\lib\site-packages\sqlalchemy\util\langhelpers.py”, line 68, i
n exit
compat.reraise(exc_type, exc_value, exc_tb)
File “f:\python\lib\site-packages\sqlalchemy\util\compat.py”, line 153, in re
raise
raise value
File “f:\python\lib\site-packages\sqlalchemy\pool\impl.py”, line 136, in do
get
return self._create_connection()
File “f:\python\lib\site-packages\sqlalchemy\pool\base.py”, line 308, in _cre
ate_connection
return _ConnectionRecord(self)
File “f:\python\lib\site-packages\sqlalchemy\pool\base.py”, line 437, in in
it
self.__connect(first_connect_check=True)
File “f:\python\lib\site-packages\sqlalchemy\pool\base.py”, line 652, in __co
nnect
connection = pool.invoke_creator(self)
File “f:\python\lib\site-packages\sqlalchemy\engine\strategies.py”, line 114,
in connect
return dialect.connect(*cargs, **cparams)
File “f:\python\lib\site-packages\sqlalchemy\engine\default.py”, line 489, in
connect
return self.dbapi.connect(*cargs, **cparams)
File "f:\python\lib\site-packages\MySQLdb_init.py", line 86, in Connect
return Connection(*args, **kwargs)
File “f:\python\lib\site-packages\MySQLdb\connections.py”, line 204, in ini
t
super(Connection, self).init(*args, **kwargs2)
TypeError: ‘User’ is an invalid keyword argument for this function