title: Writing multiple lists to CSV rows in python
body: <p>I am writing a program that extracts the history from the Google Chrome history database and outputs this to a CSV file. I am trying to put the information in multiple rows, for example a list of URL's in the first row and the webpage Title in the second row. However, when I do this, I receive the following error:</p>
  
  <p>TypeError: decoding Unicode is not supported</p>
  
  <p>Any help would be appreciated, below is my code:</p>
  
  <pre><code>import sqlite3
  import datetime
  import csv
  
  def urls():
      conn = sqlite3.connect('C:\Users\username\Desktop\History.sql')
      cursor = conn.execute("SELECT url, title, visit_count, last_visit_time from urls")
  
      timestamp = row[3]
      value = datetime.datetime(1601, 1, 1) + datetime.timedelta(microseconds=timestamp)
  
      with open("C:\Users\username\Desktop\\historyulrs.csv", "ab") as filecsv:
          filecsvwriter = csv.writer(filecsv)
          filecsvwriter.writerow(["Url", "Title", "Visit Count", "Last visit Time"])
  
      for row in cursor:
          with open("C:\Users\username\Desktop\\historyulrs.csv", "ab") as filecsv:
              filecsvwriter = csv.writer(filecsv)
              filecsvwriter.writerows([unicode(row[0], row[1]).encode("utf-8")])
  
      conn.close()
  
  urls()
  </code></pre>
  
  <p>I also retrieve the visit count and last visit time from the database to add to the CSV however. I haven't implemented this yet. </p>
  
  <p>Thanks</p>