I dont want to store the file, after parsing the file i want to store
the content of the csv to the database tables...


Here is the code snippet, which i tried to read the rows of csv file
after uploading file...

def upload_csv(self, **kw):
    csv_file = request.POST['file']
    reader = csv.reader(open(csv_file, 'rU'), dialect='excel')
    for row in reader:
        print row



and I am getting the following error message...
(i tried to open the file in write mode as wel)

TypeError: coercing to Unicode: need string or buffer, instance found



------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to