How to fix: TypeError: not all arguments converted during string formatting in Python MySQLdb

If you encounter something similar to the following:

Traceback (most recent call last):
  File "scotia.failed.email.py", line 13, in <module>
    cursor.execute (' select * from fail f where f.emailid= (%s) ', (emailid))
  File "/usr/local/lib/python2.7/dist-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:

Post a Comment

Featured Post

Updated Coupons / promo codes for Google Apps for Work / Business

To redeem: 1. Sign up for Google Apps   2. Go to your billing settings  3. Choose your payment plan  4. Enter your promo code ...