Answer the question
In order to leave comments, you need to log in
Why doesn't python see the function?
There is this piece of code:
_set_recipient(connection, recipient)
def _set_recipient(connection, recipient):
with connection.cursor() as cursor:
sql = "UPDATE qiqibot SET recipient = '"+recipient+"' WHERE `id` = 1"
cursor.execute(sql)
connection.commit()
Answer the question
In order to leave comments, you need to log in
because you call it first and there is nothing else to call, move it _set_recipient(connection, recipient)
below the function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question