I'm currently trying to import data from a csv file into my database in web2py, but a command that works on my local computer does not work in the pythonanywhere console.
I'm starting the web2py interactive console like this:
python2.6 web2py.py -M -S appname
which starts web2py in Ipython.
I then using this command in the web2py interactive console:
db.import_from_csv_file(open('csvfile.csv','rb'), null=''))
which gives me the following error:
TypeError: %d format: a number is required, not NoneType
When I try import the csv file without the null=''
argument, the importing works. I'm not what the problem is, possibly using null
in Ipython? Any help on this would be much appreciated!