I have created sample csv and imported it gives me error.
Traceback
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Traceback (most recent call last): File "D:\web2py_src\gluon\restricted.py", line 220, in restricted exec ccode in environment File "D:/web2py_src/applications/sales/controllers/default.py", line 143, in <module> File "D:\web2py_src\gluon\globals.py", line 385, in <lambda> self._caller = lambda f: f() File "D:/web2py_src/applications/sales/controllers/default.py", line 19, in import_csv table.import_from_csv_file(file) File "D:\web2py_src\gluon\dal.py", line 9319, in import_from_csv_file for lineno, line in enumerate(reader): Error: line contains NULL byte
Massimo can you please share how you using formatted .csv file.
0
remco-boerma 10 years ago
Most of the times this is a unicode issue. You can try if converting it solves your problem, and make sure the BOM header is intact. Use any capable text editor to set it right for you (notepad++ on windows will do)
Hope this helps.