Re: [web2py] Error importing csv file in python3.6

2019-02-16 Thread Maurice Waka
Narrowed down to the xml(). Can you help? On Mon, Feb 11, 2019 at 10:04 PM sandeep patel wrote: > @Lovedie > Can you explain a little bit more? What you mean by can't access the data? > > If you getting the error to import data from CSV. You can try this as well. > > form = FORM(DIV(LABEL('File

Re: [web2py] Error importing csv file in python3.6

2019-02-16 Thread Maurice Waka
After much study, I noted that the import was successful. Both in python 2.7 and 3.6. Its in python 3.6 that I get problems. Getting to select the items from the database was the problem unless i knew the item's fill name in full. The code below helps to 'auto suggest' and helps in picking the ite

Re: [web2py] Error importing csv file in python3.6

2019-02-12 Thread Maurice Waka
When I search for an item it returns blank. However I see that the upload to the db took place. When I try to add data to the database, where other data was uploaded, I get this error 1. 2. 3. 4. 5. 6. Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/restricted.py", line

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread sandeep patel
@Lovedie Can you explain a little bit more? What you mean by can't access the data? If you getting the error to import data from CSV. You can try this as well. form = FORM(DIV(LABEL('File input',_for='exampleInputFile'),INPUT(_type='file',_name='csvsheet',_id="exampleInputFile"),_class='from-gro

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread Lovedie JC
Works. But I can't access the data. On Mon, 11 Feb 2019, 21:02 sandeep patel In fact, this is an open issue > for the same problem. You > can check that as well > > On Mon, Feb 11, 2019 at 11:27 PM sandeep patel > wrote: > >> I had the same issue. I

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread sandeep patel
In fact, this is an open issue for the same problem. You can check that as well On Mon, Feb 11, 2019 at 11:27 PM sandeep patel wrote: > I had the same issue. I have solved this way. > Please try this > You have to changing line 926 of gluon/packages

Re: [web2py] Error importing csv file in python3.6

2019-02-11 Thread sandeep patel
I had the same issue. I have solved this way. Please try this You have to changing line 926 of gluon/packages/dal/pydal/objects.py from reader = csv.reader(csvfile, delimiter=delimiter, quotechar=quotechar, quoting=quoting) to reader = csv.reader(codecs.iterdecode(csvfile,'utf-8'), delimiter=delimi

[web2py] Error importing csv file in python3.6

2019-02-11 Thread Maurice Waka
I shifted to web2py/python3. In python2.7 I was able to upload csv files but using the same code below I get an error. For example: def import_csv(): form = FORM(INPUT(_type = 'file', _name = 'csv_file'), INPUT(_type = 'submit', _value = T('Import'))) return dict(form=form) @m