Have a look on how you open the file to be imported: python2: open(filename, 'rb')
python3: open(str(filename), 'r', encoding='utf-8')) Hope, it helps! Regards Clemens On Thursday, March 5, 2020 at 10:07:27 AM UTC+1, Andrew Rogers wrote: > > Hi > > I exported a CSV file using the Import/Export > 'export as csv file' > button found in the Database interface of web2py. That worked fine. > > I then modified the exported file slightly - just changed the IDs. > > I then tried to import the modified file back into the table using the > 'import' button in the same area. But it fails with: > > <div>unable to parse csv file<pre>iterator should return strings, not > bytes (did you open the file in text mode?)</pre></div> × > > What am i doing wrong? > > Thanks > Andrew > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/cd078f5a-6053-40ff-a1ff-c6241c3518d7%40googlegroups.com.

