I am running a script that does some queries to a database. Those queries are made of strings that come in a Json package from GroupMe's API. This is the error I'm getting:
x.execute("""SELECT url FROM BIN WHERE name=%s""",(str(messageData['text'].lower())))
File "/home/User2/.local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 187, in execute
query = query % tuple([db.literal(item) for item in args])
TypeError: not all arguments converted during string formatting
The program is a GroupMe Bot that prints a link for a gif when it gets mentioned in a message. So if I were to send the message "ohNo.gif" the bot would look on the DB for the imgur link that's related to "ohNo.gif" and then print it. Apparently there is something wrong with my string conversion.