I am getting problems with CSV Import:
'unable to parse csv file'
This is with a file which has been exported via appadmin, so should
contain all the right fields.
Some tables import their dumps fine.
This seems to be caused by this model definition:
SQLField('type', db.or_organisation_type)
With this validator:
db['%s' % table].type.requires=IS_NULL_OR(IS_IN_DB
(db,'or_organisation_type.id','or_organisation_type.name'))
I have <NULL> showing in the field in the CSV.
If I change that then the next error I get is with the datetime field:
SQLField('modified_on','datetime',default=now)
This is saved as: 11/01/2009 10:26:55
But gives a Traceback:
File "C:\Bin\web2py\gluon\sql.py", line 1368, in __getitem__
y,m,d=[int(x) for x in str(value)[:10].strip().split('-')]
ValueError: invalid literal for int() with base 10: '11/01/2009'
I went back to do some tests on earlier versions of Web2Py & found
that all versions (back to 1.54 at least) on both win & src versions
(Python 2.54. for the latter) fail to even Export with the Examples
application...I try creating Users or Products & the export Tracesback
with:
File "/Users/massimodipierro/web2py/gluon/sql.py", line 337, in
__getitem__
KeyError: 'users'
Thanks for pointers on best way forward :)
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
-~----------~----~----~----~------~----~------~--~---