Skip to content
Advertisement

aiosqlite “Result” object has no attribue “execute”

I’m making a discord.py bot and I’m currently on the economy part, but I’m encountering a strange error that I’ve never ran into before and has most of the python discord help dumbfounded. The error is as follows:

Command raised an exception: AttributeError: ‘Result’ has no attribute ‘execute’

I’m having trouble understanding the meaning of this error due to the fact that I’m executing it on a cursor object, and not a result?

For those who need the code, here you go:

Advertisement

Answer

You should read documentation for aiosqlite because it works different then standard sqlite3

You need


EDIT:

It may also need to use await in every function. And add async before def

and later you have to run it also with await


PEP 8 — Style Guide for Python Code

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement