N
N
NOblo2020-06-19 15:10:02
Python
NOblo, 2020-06-19 15:10:02

sqlite3 error, how to fix?

Here is the error:

for i in sql.execute("SELECT Cash FROM _bot_ WHERE teleid = ?", (call.message.chat.id,)):

sqlite3.ProgrammingError: Recursive use of cursors not allowed.

*I'm still using threads, (import threadings)

What's causing the error, and how can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
datka, 2020-06-19
@NOblo

Learn to google. First link. https://stackoverflow.com/questions/26629080/pytho...

Well, the thing is the sqlite3 module doesn't like multithread cases, you can see that in the sqlite3 module's documentation
...the Python module disallows sharing connections and cursors between threads[1]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question