title: Uploading and Processing a CSV File using Bottle; Possible Encoding Issue
body: <p>I am trying to upload and process a CSV file via an HTML form using Bottle. I've already created a working example with Tkinter; the CSV uploads nicely and all data, including the hashed passwords get into the Sqlite3 database. </p>
  
  <p><strong>WORKING TKINTER CODE ...</strong></p>
  
  <pre><code>import os
  import sqlite3
  import csv
  from pbkdf2 import crypt
  from tkinter import *
  from tkinter import filedialog
  root = Tk()
  root.geometry("500x500")
  
  def open1():
      filename = filedialog.askopenfilename()
      with open(filename,"r") as s_info:
          reader = csv.reader(s_info)
          for x in reader:
              pwhash = crypt(x[1])
              connection = sqlite3.connect("users.db")
              cursor_v = connection.cursor()
              cursor_v.execute("insert into users (cemail, cpassword) values (?,?)", (x[0],pwhash))
              connection.commit()
              cursor_v.close()
          else:
              print("CSV Uploaded")
  
  x = Button(text="Open",command=open1).pack()
  </code></pre>
  
  <p>The issue is when I try to re-create the the code in Bottle, I get the following error:</p>
  
  <p><strong>BOTTLE CODE - HTML:</strong></p>
  
  <pre><code>&lt;form action="/panel" method="post" enctype="multipart/form-data"&gt;
    &lt;input type="file" name="data" /&gt;
    &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>BOTTLE CODE - ROUTE:</strong></p>
  
  <pre><code>@route('/panel', method='POST')
  def do_upload():
      data = request.files.data
      with open(data,"r") as s_info:
          reader = csv.reader(s_info)
          for x in reader:
              pwhash = crypt(x[1])
              connection = sqlite3.connect("users.db")
              cursor_v = connection.cursor()
              cursor_v.execute("insert into users (cemail, cpassword) values (?,?)", (x[0],pwhash))
              connection.commit()
              cursor_v.close()
          else:
              return "&lt;p&gt;CSV Uploaded&lt;/p&gt;"
  </code></pre>
  
  <p><strong>ERROR:</strong></p>
  
  <pre><code>with open(data,"r") as s_info:
  TypeError: invalid file: &lt;bottle.FileUpload object at 0x105cb84d0&gt;
  </code></pre>
  
  <p>Any help is appreciated</p>