title: TypeError: not enough arguments for format string python mysql
body: <p>I want to collect each people's grade in the special subject of course with python. I get each person's grade one by one. For this reason, I write a SQL code like below. row come from easrlier sql result and it prints subject and course and it shows like </p>
  
  <blockquote>
    <p>('CS', '201')</p>
  </blockquote>
  
  <p>categoriesWithFeedback contains unique nickname. I write sql code but it cannot understand row contains 2 parameter I think. </p>
  
  <pre><code>sqlgrade = "SELECT `grade` FROM `enrolledtable` WHERE `subject`=%s and `course`=%s and `nickname`=%s"
  
  IE_students.append(categoriesWithFeedback)
  
  cursor.execute(sqlgrade, (row, categoriesWithFeedback))
  
  IEaveragegrades += cursor.fetchone() 
  </code></pre>
  
  <p>`</p>
  
  <p>Python ERROR is that</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File
    "C:\wamp\www\MLWebsite\website\new.py", line 85, in 
        cursor.execute(sqlgrade, (row, categoriesWithFeedback))   File "C:\Python27\Lib\site-packages\pymysql\cursors.py", line 163, in
    execute
        query = self.mogrify(query, args)   File "C:\Python27\Lib\site-packages\pymysql\cursors.py", line 142, in
    mogrify
        query = query % self._escape_args(args, conn) TypeError: not enough arguments for format string</p>
  </blockquote>
  
  <p>Can anyone help me to solve that error? I don't want to use sqlparse if there is any solution without that.</p>