db_connect() sql = """UPDATE permissions SET deviceID='%s' WHERE userID='%d'""" % (mac, username) data = (mac, username) cursor.execute(sql, data) con.commit()
выдает:
Traceback (most recent call last): File "./auth.py", line 109, in <module> cursor.execute(sql, data) File "/opt/lib/python3.8/site-packages/pymysql/cursors.py", line 161, in execute File "/opt/lib/python3.8/site-packages/pymysql/cursors.py", line 140, in mogrify TypeError: not all arguments converted during string formatting
проверял переменные mac и username: mac
<class 'str'>
username
<class 'int'>