AttributeError:“ int”对象没有属性“ type”

时间:2019-07-03 03:36:22

标签: python sqlalchemy attributeerror

我有一个代码,该代码使用sqlalchemy执行update语句,然后将包含update语句的参数传递给connection.execute(),但出现以下错误。

AttributeError: 'int' object has no attribute 'type'

我想更新我的数据库

我试图将其写为connection.execute(type(statement))

然后我遇到以下错误:

Traceback (most recent call last):
  File "./update.py", line 70, in <module>
    result_proxy = connect.execute(type(stmt1))
  File "/Users/sdash/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 988, in execute
    return meth(self, multiparams, params)
TypeError: _execute_on_connection() missing 1 required positional argument: 'params'

0 个答案:

没有答案