title: TypeError: unsupported format string passed to bytes.__format__
body: <p>Hi I'm trying to print an sqlite file to a readable format. I'm using dionea honeynet's python script. I encounter this error every time I run the script:</p>
  
  <pre><code>File "./readlogsqltree.py", line 268, in print_logins
      login['login_password']))
  
  TypeError: unsupported format string passed to bytes.__format__
  </code></pre>
  
  <p>The login['login_password'] is a variable taken from a select statement. Here is the function that is being called:</p>
  
  <pre><code>def print_logins(cursor, connection, indent):
      r = cursor.execute("""
          SELECT 
              login_username,
              login_password
          FROM 
              logins
          WHERE connection = ?""", (connection, ))
      logins = resolve_result(r)
      for login in logins:
          print("{:s} login - user:'{:s}' password:'{:s}'".format(
              ' ' * indent,
              login['login_username'],
              login['login_password']))
  </code></pre>
  
  <p>Resolve result function:</p>
  
  <pre><code>def resolve_result(resultcursor):
      names = [resultcursor.description[x][0] for x in range(len(resultcursor.description))]
      resolvedresult = [ dict(zip(names, i)) for i in resultcursor]
      return resolvedresult
  </code></pre>
  
  <p>Cursor:</p>
  
  <pre><code>def print_db(opts, args):
      dbpath = 'logsql.sqlite'
      if len(args) &gt;= 1:
          dbpath = args[0]
      print("using database located at {0}".format(dbpath))
      dbh = sqlite3.connect(dbpath)
      cursor = dbh.cursor()
  </code></pre>