title: Could not process parameters: int(2), it must be of type list, tuple or dict in python
body: <p>I have two tables
  StepNo (which is step number ) and stepText ( as every step has step text )</p>
  <p>Now I try to retrieve a text from a database table to a text label I have in my UI
  (I did insert them from another UI that insert the stepText And StepNo into the database
  but I cant retrieve them</p>
  <p>l stands for the label</p>
  <pre><code>def step2():
      result = search_step(2)
      l[&quot;text&quot;] =['stepNo']
  </code></pre>
  <p>and those are the codes in db_setup</p>
  <pre><code>def add_to_step(stepText, stepNo):
      print(stepText)
      print(stepNo)
      sql = &quot;&quot;&quot;INSERT INTO `steps`(`stepText`, `stepNo`) VALUES (%s,%s)&quot;&quot;&quot;
      c.execute(sql, (stepText, stepNo))
      result = c.fetchone()
      conn.commit()
      print(&quot;add to step: &quot;, result)
      return result
  
  
  def search_step(stepNo):
      
      print(stepNo)
      sql = &quot;&quot;&quot;SELECT * FROM `steps` WHERE stepNo = %s&quot;&quot;&quot;
      c.execute(sql, stepNo)
      result = c.fetchone()
      conn.commit()
      print(&quot;selected step: &quot;, result)
      return result
  </code></pre>
  <p>And this is the code of the label</p>
  <pre><code># Create label
  l = Label(window, text = &quot;Change the paragraph font to Arial&quot;,)
  l.config(font =(&quot;Calibri&quot;, 14))
  l.pack(pady=40)
  
  l.place(relx = 0.5,
                     rely = 0.5,
                     anchor = 'center')
  </code></pre>
  <p>and it gives me this error</p>
  <pre><code>File &quot;c:\Users\maroc\OneDrive\Desktop\mouse features29-3\mouse features\stepsui.py&quot;, line 19, in step2
      result = search_step(2,)
    File &quot;c:\Users\maroc\OneDrive\Desktop\mouse features29-3\mouse features\db_setup.py&quot;, line 49, in search_step
      c.execute(sql, stepNo)
    File &quot;C:\Users\maroc\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mysql\connector\cursor.py&quot;, line 562, in execute
      raise errors.ProgrammingError(
  mysql.connector.errors.ProgrammingError: Could not process parameters: int(2), it must be of type list, tuple or dict
  </code></pre>
  <p>I really need help for this situation as it is very important to me
  thanks in advance</p>