使用web.py上传文件时,会引发异常" SystemError: error return without exception set"
。
这里是追溯
... File "../web/template.py", line 882, in __call__ return BaseTemplate.__call__(self, *a, **kw) File "../web/template.py", line 809, in __call__ return self.t(*a, **kw) File "", line 193, in __template__ File "../web/webapi.py", line 276, in input out = rawinput(_method) File "../web/webapi.py", line 249, in rawinput a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1) File "../python2.7/cgi.py", line 508, in __init__ self.read_multi(environ, keep_blank_values, strict_parsing) File "../python2.7/cgi.py", line 632, in read_multi environ, keep_blank_values, strict_parsing) File "../python2.7/cgi.py", line 510, in __init__ self.read_single() File "../python2.7/cgi.py", line 647, in read_single self.read_lines() File "../python2.7/cgi.py", line 669, in read_lines self.read_lines_to_outerboundary() File "../python2.7/cgi.py", line 697, in read_lines_to_outerboundary line = self.fp.readline(1 """ def POST(self): x = web.input(myfile= {}) return x.myfile.file.read()
答案 0 :(得分:0)
不确定,但无论如何我会切换到WSGI,它更快更容易使用。运行内置的Web服务器时是否收到该错误?