title: MySQL Connector Cursor Description
body: <p>I am trying to insert the column headings from the output of a procedure in front of the results using MySQL connector. </p>
  
  <p>My code is currently:</p>
  
  <pre><code>    import mysql.connector
  from mysql.connector import errorcode
  
  
  cnx = mysql.connector.connect(user='###', password='###',
                                host='###',
                                port='###',
                                database='new_schema')
  if cnx.is_connected():
          print('Connection Established.')
      else:
          print('Connection Failed.')
  
  
      def call_new_carer_report():
          cur = cnx.cursor()
          cur.callproc('new_carer_report')
          cur.stored_results()
          for result in cur.stored_results():
              global results
              results = result.fetchall()
          header = [i[0] for i in cur.description]
          rows = [list(i) for i in cur.fetchall()]
          rows.insert(0, header)
          cur.close()
  </code></pre>
  
  <p>I recieve an output correctly with <code>results</code> but recieve an error on line: </p>
  
  <pre><code>header = [i[0] for i in cur.description]
  </code></pre>
  
  <p>Which States:</p>
  
  <pre><code>    header = [i[0] for i in cur.description]
  TypeError: 'NoneType' object is not iterable
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>