Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Sqlalchemy设置导致错误的默认日期时间_Python_Sqlalchemy_Flask Sqlalchemy_Asyncpg - Fatal编程技术网

Python Sqlalchemy设置导致错误的默认日期时间

Python Sqlalchemy设置导致错误的默认日期时间,python,sqlalchemy,flask-sqlalchemy,asyncpg,Python,Sqlalchemy,Flask Sqlalchemy,Asyncpg,我正试图将默认当前时间设置为字段,但出现了一个错误。 我正在使用sqlalchemy和asyncpg 错误: DBAPIError("(sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $5: False (expected a datetime.date or datetime.da

我正试图将默认当前时间设置为字段,但出现了一个错误。 我正在使用sqlalchemy和asyncpg

错误:

DBAPIError("(sqlalchemy.dialects.postgresql.asyncpg.Error) 
<class 'asyncpg.exceptions.DataError'>: invalid input for query argument $5: False 
(expected a datetime.date or datetime.datetime instance, got 'bool')")
版本

pip list | grep -i sql
SQLAlchemy        1.4.4
命令:

async def create_user(db_session, full_name, phone_number, current_token):
    await db_session.execute(statement=models.users.insert().values(full_name=full_name, 
                                                                    phone_number=phone_number, 
                                                                    current_token=current_token))

我知道了,hust错误的表数据(丢失的表)。请删除一个问题
async def create_user(db_session, full_name, phone_number, current_token):
    await db_session.execute(statement=models.users.insert().values(full_name=full_name, 
                                                                    phone_number=phone_number, 
                                                                    current_token=current_token))