问题描述
尝试从 aiosqlite 更改为 asyncpg,并一直运行到
InterfaceError: the server expects 2 arguments for this query,1 was passed
HINT: Check the query against the passed list of arguments.
以下是一些有问题的线路
data = await bot.db.fetch('''SELECT study_time FROM guildData WHERE guild_id = ($1) AND user_id = ($2)''',(ctx.guild.id,ctx.author.id))
await bot.db.execute('''UPDATE guildData SET study_time = study_time + ($1) WHERE guild_id = ($2) AND user_id = ($3)''',(total_mins,ctx.guild.id,ctx.author.id))
async with bot.db.execute(f'''SELECT user_id,study_time FROM guildData WHERE guild_id = ($1) ORDER BY study_time DESC LIMIT ($2) OFFSET ($3)''',entries_per_page,entries_per_page*(current-1),)) as cursor:
查了参考,不知道应该改成什么...?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)