upon uploading a file from this form, this is the error:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/web/application.py", line 209, in process
return p(lambda: process(processors))
File "/usr/lib/pymodules/python2.6/web/application.py", line 537, in processor
return handler()
File "/usr/lib/pymodules/python2.6/web/application.py", line 209, in <lambda>
return p(lambda: process(processors))
File "/usr/lib/pymodules/python2.6/web/application.py", line 216, in process
raise self.internalerror()
File "/usr/lib/pymodules/python2.6/web/application.py", line 449, in internalerror
return debugerror.debugerror()
File "/usr/lib/pymodules/python2.6/web/debugerror.py", line 299, in debugerror
return web._InternalError(djangoerror())
File "/usr/lib/pymodules/python2.6/web/debugerror.py", line 289, in djangoerror
return t(exception_type, exception_value, frames)
File "/usr/lib/pymodules/python2.6/web/template.py", line 850, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/usr/lib/pymodules/python2.6/web/template.py", line 768, in __call__
return self._join_output(out)
File "/usr/lib/pymodules/python2.6/web/template.py", line 774, in _join_output
for name, value in out:
File "/usr/lib/pymodules/python2.6/web/debugerror.pyc", line 183, in __template__
$if ctx.output or ctx.headers:
File "/usr/lib/pymodules/python2.6/web/webapi.py", line 222, in input
return storify(out, *requireds, **defaults)
File "/usr/lib/pymodules/python2.6/web/utils.py", line 141, in storify
value = getvalue(value)
File "/usr/lib/pymodules/python2.6/web/utils.py", line 128, in getvalue
return unicodify(x.value)
File "/usr/lib/pymodules/python2.6/web/utils.py", line 123, in unicodify
if _unicode and isinstance(s, str): return safeunicode(s)
File "/usr/lib/pymodules/python2.6/web/utils.py", line 231, in safeunicode
return obj.decode(encoding)
File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 12-13: invalid data
I don't know what it is trying to decode, the uploaded binary data maybe?
I have a similar issue, but no validation is required, just a simple form with one File field:
plugin_form = web.form.Form(
web.form. File('plugin_ file', web.form.notnull),
)
upon uploading a file from this form, this is the error:
Traceback (most recent call last): pymodules/ python2. 6/web/applicati on.py", line 209, in process processors) ) pymodules/ python2. 6/web/applicati on.py", line 537, in processor pymodules/ python2. 6/web/applicati on.py", line 209, in <lambda> processors) ) pymodules/ python2. 6/web/applicati on.py", line 216, in process ror() pymodules/ python2. 6/web/applicati on.py", line 449, in internalerror debugerror( ) pymodules/ python2. 6/web/debugerro r.py", line 299, in debugerror ror(djangoerror ()) pymodules/ python2. 6/web/debugerro r.py", line 289, in djangoerror pymodules/ python2. 6/web/template. py", line 850, in __call__ __call_ _(self, *a, **kw) pymodules/ python2. 6/web/template. py", line 768, in __call__ output( out) pymodules/ python2. 6/web/template. py", line 774, in _join_output pymodules/ python2. 6/web/debugerro r.pyc", line 183, in __template__ pymodules/ python2. 6/web/webapi. py", line 222, in input pymodules/ python2. 6/web/utils. py", line 141, in storify pymodules/ python2. 6/web/utils. py", line 128, in getvalue pymodules/ python2. 6/web/utils. py", line 123, in unicodify pymodules/ python2. 6/web/utils. py", line 231, in safeunicode encoding) python2. 6/encodings/ utf_8.py" , line 16, in decode utf_8_decode( input, errors, True)
File "/usr/lib/
return p(lambda: process(
File "/usr/lib/
return handler()
File "/usr/lib/
return p(lambda: process(
File "/usr/lib/
raise self.internaler
File "/usr/lib/
return debugerror.
File "/usr/lib/
return web._InternalEr
File "/usr/lib/
return t(exception_type, exception_value, frames)
File "/usr/lib/
return BaseTemplate.
File "/usr/lib/
return self._join_
File "/usr/lib/
for name, value in out:
File "/usr/lib/
$if ctx.output or ctx.headers:
File "/usr/lib/
return storify(out, *requireds, **defaults)
File "/usr/lib/
value = getvalue(value)
File "/usr/lib/
return unicodify(x.value)
File "/usr/lib/
if _unicode and isinstance(s, str): return safeunicode(s)
File "/usr/lib/
return obj.decode(
File "/usr/lib/
return codecs.
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 12-13: invalid data
I don't know what it is trying to decode, the uploaded binary data maybe?