this traceback refers to an old version of dal.py, not the trunk version. Please try trunk.
Massimo On May 23, 8:40 am, Gustavo Maggi <gmag...@latinuxpress.com> wrote: > Ready, this is the traceback: > > Traceback (most recent call last): > File "/home/latinux/desarrollo/web2py/gluon/restricted.py", line > 181, in restricted > exec ccode in environment > File > "/home/latinux/desarrollo/web2py/applications/error_reference/controllers/a > ppadmin.py" > <http://127.0.0.1:8000/admin/default/edit/error_reference/controllers/...>, > line 417, in <module> > File "/home/latinux/desarrollo/web2py/gluon/globals.py", line 133, in > <lambda> > self._caller = lambda f: f() > File > "/home/latinux/desarrollo/web2py/applications/error_reference/controllers/a > ppadmin.py" > <http://127.0.0.1:8000/admin/default/edit/error_reference/controllers/...>, > line 211, in select > request.vars.csvfile.file) > File > "/home/latinux/desarrollo/web2py/applications/error_reference/controllers/a > ppadmin.py" > <http://127.0.0.1:8000/admin/default/edit/error_reference/controllers/...>, > line 156, in import_csv > table.import_from_csv_file(file) > File "/home/latinux/desarrollo/web2py/gluon/dal.py", line 4587, in > import_from_csv_file > items = [fix(self[colnames[i]], line[i], id_map) for i in cols] > File "/home/latinux/desarrollo/web2py/gluon/dal.py", line 4557, in fix > value = [id_map[ref_table][int(v)] for v in bar_decode_string(value)] > TypeError: 'NoneType' object is unsubscriptable > > 2011/5/22 Massimo Di Pierro <massimo.dipie...@gmail.com> > > > > > > > > > > > I need your help to debug this. > > Please edit applications/yourapp/controllers/appadmin.py and replace > > > try: > > import_csv(db[request.vars.table], > > request.vars.csvfile.file) > > response.flash = T('data uploaded') > > except Exception, e: > > response.flash = DIV(T('unable to parse csv > > file'),PRE(str(e))) > > > with > > > if True: #try: > > import_csv(db[request.vars.table], > > request.vars.csvfile.file) > > response.flash = T('data uploaded') > > #except Exception, e: > > # response.flash = DIV(T('unable to parse csv > > file'),PRE(str(e))) > > > try upload again and you will get a ticket. Send me the ticket. > > > On May 22, 9:24 pm, Gustavo Maggi <gmag...@latinuxpress.com> wrote: > > > Yes, I try with the trunk version and throws the same error... screen > > > attached... > > > > 2011/5/22 Massimo Di Pierro <massimo.dipie...@gmail.com> > > > > > Can you try the code in trunk. We just changed a few things in there > > > > related to csv import. > > > > > On May 22, 2:08 pm, Gustavo Maggi <gmag...@latinuxpress.com> wrote: > > > > > Hi, I'm trying to do the following: > > > > > > 1) In the model: > > > > > > db.define_table('dad',Field('name')) > > > > > > db.define_table('son',Field('name'),Field('dads','list:reference > > dad')) > > > > > > 2) Create some registers in the appadmin interface: > > > > > > dad.id< > > > >http://127.0.0.1:8000/error_reference/appadmin/select/db?orderby=dad.id > > > > > > dad.name< > > > >http://127.0.0.1:8000/error_reference/appadmin/select/db?orderby=dad... > > .> > > > > > 1 <http://127.0.0.1:8000/error_reference/appadmin/update/db/dad/1 > > > > >leonor2< > >http://127.0.0.1:8000/error_reference/appadmin/update/db/dad/2> > > > > > gustavo > > > > > > son.id< > > > >http://127.0.0.1:8000/error_reference/appadmin/select/db?orderby=son.id > > > > > > son.name< > > > >http://127.0.0.1:8000/error_reference/appadmin/select/db?orderby=son... > > .> > > > > > son.dads< > > > >http://127.0.0.1:8000/error_reference/appadmin/select/db?orderby=son... > > .> > > > > > 1 <http://127.0.0.1:8000/error_reference/appadmin/update/db/son/1 > > > > >gustavo1, > > > > > 2 > > > > > 3) I export the son table in csv file: *db_son.csv* > > > > > * > > > > > * > > > > > 4) Now, I try to import the same file (db_son.csv), without changes, > > in > > > > the > > > > > *db_son.csv, *and give me the following error: > > > > > *'NoneType' object is unsubscriptable * > > > > > * > > > > > * > > > > > I'm using sqlite3 and Version 1.95.1 (2011-04-25 15:04:14) > > > > > > -- > > > > > Gustavo Maggi > > > > > Latinux Press > > > > > gmag...@latinuxpress.comwww.latinuxmagazine.com > > > > > > Este mensaje y los archivos que se adjunten se dirigen exclusivamente > > al > > > > > destinatario. Contiene información CONFIDENCIAL sometida a secreto > > > > > profesional. Si ha recibido este mensaje por error debe saber que su > > > > > lectura, copia y uso están prohibidos. This information is > > CONFIDENTIAL > > > > and > > > > > may also be attorney-privileged. The information is intended only for > > the > > > > > use of the individual or entity to whom it is addressed. > > > > -- > > > Gustavo Maggi > > > Latinux Press > > > gmag...@latinuxpress.comwww.latinuxmagazine.com > > > > Este mensaje y los archivos que se adjunten se dirigen exclusivamente al > > > destinatario. Contiene información CONFIDENCIAL sometida a secreto > > > profesional. Si ha recibido este mensaje por error debe saber que su > > > lectura, copia y uso están prohibidos. This information is CONFIDENTIAL > > and > > > may also be attorney-privileged. The information is intended only for the > > > use of the individual or entity to whom it is addressed. > > > > error_nonetype.png > > > 147KViewDownload > > -- > Gustavo Maggi > Latinux Press > gmag...@latinuxpress.comwww.latinuxmagazine.com > > Este mensaje y los archivos que se adjunten se dirigen exclusivamente al > destinatario. Contiene información CONFIDENCIAL sometida a secreto > profesional. Si ha recibido este mensaje por error debe saber que su > lectura, copia y uso están prohibidos. This information is CONFIDENTIAL and > may also be attorney-privileged. The information is intended only for the > use of the individual or entity to whom it is addressed.