title: Retrieving fields in from Mysql connection returns AttributeError: 'NoneType' object has no attribute 'format' error
body: <p>I am new to Python and am trying to retrieve data from a MariaDB. Using the example found on the <a href="https://mariadb.com/resources/blog/how-to-connect-python-programs-to-mariadb/" rel="nofollow noreferrer">official documentation</a> and tweaking with my own columns like this returns the following error:</p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute 'format'
  </code></pre>
  
  <p>Heres what my code looks like:</p>
  
  <pre><code>cursor.execute("SELECT id, name FROM playlists")
  
  for id, name in cursor:
      print("ID: {}, Name: {}").format(id,name)
  </code></pre>
  
  <p>Can someone explain why I'm getting this error? and whether I'll need to declare each column name in the for loop? (where it says <code>for id, name in cursor</code></p>