2010/4/7 chris <[email protected]>: > Whenever I try to upload a file using the following syntax: > > p = web.input(_unicode=False,page={}) > > I keep getting the following error: > > 2010-04-07 13:48:29: (mod_fastcgi.c.2610) FastCGI-stderr: Traceback > (most recent call last): > File "/usr/lib/python2.5/site-packages/web/application.py", line > 242, in process > return self.handle() > File "/usr/lib/python2.5/site-packages/web/application.py", line > 233, in handle > return self._delegate(fn, self.fvars, args) > File "/usr/lib/python2.5/site-packages/web/application.py", line > 415, in _delegate > return handle_class(cls) > File "/usr/lib/python2.5/site-packages/web/application.py", line > 390, in handle_class > return tocall(*args) > File "/var/www/webapp/webapp.py", line 35, in POST > return render.upload(f) > File "/usr/lib/python2.5/site-packages/web/template.py", line 1024, > in template > return self._base(t(*a, **kw)) > File "/usr/lib/python2.5/site-packages/web/template.py", line 898, > in __call__ > return BaseTemplate.__call__(self, *a, **kw) > File "/usr/lib/python2.5/site-packages/web/template.py", line 804, > in __call__ > return self.t(*a, **kw) > File "templates/upload.html", line 6, in __template__ > File "/usr/lib/python2.5/site-packages/web/template.py", line 821, > in _escape > value = safeunicode(value) > File "/usr/lib/python2.5/site-packages/web/utils.py", line 326, in > safeunicode > return obj.decode(encoding) > File "/usr/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 0x8b in position > 306: unexpected code byte > > > Wonder if anyone has any ideas?
Looks like the error is inside the template, not in web.input. -- You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en.
