Hi Massimo, Thanks for your prompt response.
I tried uploading multiple binary files (image, pdf, etc.) and it's consistently the case. I'm using latest web2py (downloaded few hours back): 1.74.3. File name are pure ascii, so I don't see any issues there. File sizes have been from 32KB to about 300KB. Here's the trace from GAE logs. I've masked my app-id (hope you won't mind). ------------ 122.172.62.200 - - [22/Dec/2009:11:05:41 -0800] "GET /mywiki/default/ documents/2007 HTTP/1.1" 500 397 - "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.30 Safari/532.5,gzip(gfe)" "XXX.appspot.com" E 12-22 11:05AM 41.509 In FILE: /base/data/home/apps/XXX/1.338633428120223078/applications/ mywiki/controllers/default.py Traceback (most recent call last): File "/base/data/home/apps/XXX/1.338633428120223078/gluon/ restricted.py", line 173, in restricted exec ccode in environment File "/base/data/home/apps/XXX/1.338633428120223078/applications/ mywiki/controllers/default.py:documents", line 112, in <module> File "/base/data/home/apps/XXX/1.338633428120223078/gluon/ globals.py", line 96, in <lambda> self._caller = lambda f: f() File "/base/data/home/apps/XXX/1.338633428120223078/applications/ mywiki/controllers/default.py:documents", line 63, in documents File "/base/data/home/apps/XXX/1.338633428120223078/gluon/contrib/ gql.py", line 666, in select return self.parse(self._db, rows, colnames, False) File "/base/data/home/apps/XXX/1.338633428120223078/gluon/sql.py", line 2998, in parse value = value.decode(db._db_codec) File "/base/python_dist/lib/python2.5/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: unexpected code byte ------------ Hope I'm not doing something silly. Perhaps if you get a chance to quickly test your mywiki example yourself on GAE, you should be able to reproduce it. Thanks once again. Best Regards, V On Dec 23, 1:09 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > Thank you v. > > Are you sure the problem is the file content and not the file name or > the file size? > Which verison of web2py do you have? > I any case, can you post the complete traceback? > > Massimo > > On Dec 22, 2:01 pm, v <vishal...@gmail.com> wrote: > > > > > Hi Massimo, > > > First of all, thanks for creating web2py.. AMAZING work!! Highly > > intuitive and almost flat learning curve, compared with RoR and > > Django. > > > I was trying the mywiki example from the web2py manual and while the > > documents upload/download worked fine locally with SQLite, it doesn't > > quite work with GAE datastore, especially for non-ascii documents > > uploads. Works fine with ASCII file uploads. > > > I'm using web2py 1.74.3. Wonder if there's a generic limitation to > > upload binary files on GAE using web2py? here's my db.py: > > > --------- > > if request.env.web2py_runtime_gae: > > db = DAL('gae') > > session.connect(request, response, db=db) > > else: > > db = DAL('sqlite://storage.sqlite') > > > <snip> > > > db.define_table('document', > > SQLField('timestamp', 'datetime', default=now), > > SQLField('page', db.page), > > SQLField('name'), > > SQLField('file', 'upload', > > uploadfield='file_storage'), > > SQLField('file_storage', 'blob')) > > -------- > > > Thanks in advance. > > > Best Regards, > > - V -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.