My Database Table (sqlite) not readable in Web2Py if I CSV import a
bad date!
Field format in CSV should be: 2009-03-31 10:46:51
Excel converts this silently to: 31/03/2009 10:46
The record gets imported into DB but then a query on this table gives:
Traceback (most recent call last):
File "C:\Bin\web2py\gluon\restricted.py", line 98, in restricted
exec ccode in environment
File "C:\Bin\web2py\applications\sahana/views/default/
appadmin.html", line 324, in <module>
File "C:\Bin\web2py\gluon\sqlhtml.py", line 614, in __init__
for (rc, record) in enumerate(sqlrows):
File "C:\Bin\web2py\gluon\sql.py", line 2116, in __iter__
yield self[i]
File "C:\Bin\web2py\gluon\sql.py", line 2071, in __getitem__
str(value)[:10].strip().split('-')]
ValueError: invalid literal for int() with base 10: '31/03/2009'
Whilst Excel is obviously being bad here, is there any way web2py can
be made more tolerant of such issues?
(Excel will commonly be used to prepare data from a foreign source to
be suitable for importing into an application)
F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---