Такой запрос не проходит:
cursor.execute("UPDATE hiveos SET status=0 WHERE id_farm=%s",('10'))
А такой проходит:
cursor.execute("UPDATE hiveos SET status=0 WHERE id_farm=%s",('5'))
Ошибка:
Traceback (most recent call last):
File "C:\Users\Ivan\AppData\Roaming\Python\Python39\site-packages\MySQLdb\cursors.py", line 201, in execute
query = query % args
TypeError: not all arguments converted during bytes formatting
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Ivan\Desktop\hiveos\test.py", line 77, in <module>
run()
File "C:\Users\Ivan\Desktop\hiveos\test.py", line 42, in run
cursor.execute("UPDATE hiveos SET status=0 WHERE id_farm=%s",('10'))
File "C:\Users\Ivan\AppData\Roaming\Python\Python39\site-packages\MySQLdb\cursors.py", line 203, in execute
raise ProgrammingError(str(m))
MySQLdb._exceptions.ProgrammingError: not all arguments converted during bytes formatting