使用 web.py 上传文件时,会" SystemError: error return without exception set"引发异常。
这是回溯
...
文件“../web/template.py”,第 882 行,在 __call__
返回 BaseTemplate.__call__(self, *a, **kw)
文件“../web/template.py”,第 809 行,在 __call__ 中
返回 self.t(*a, **kw)
文件“”,第 193 行,在 __template__ 中
文件“../web/webapi.py”,第 276 行,输入
out = rawinput(_method)
文件“../web/webapi.py”,第 249 行,在 rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
文件“../python2.7/cgi.py”,第 508 行,在 __init__
self.read_multi(环境,keep_blank_values,strict_parsing)
文件“../python2.7/cgi.py”,第 632 行,在 read_multi
环境,keep_blank_values,strict_parsing)
__init__ 中的文件“../python2.7/cgi.py”,第 510 行
self.read_single()
文件“../python2.7/cgi.py”,第 647 行,在 read_single 中
self.read_lines()
文件“../python2.7/cgi.py”,第 669 行,在 read_lines 中
self.read_lines_to_outerboundary()
文件“../python2.7/cgi.py”,第 697 行,在 read_lines_to_outerboundary
线 = self.fp.readline(1
"""
def POST(自我):
x = web.input(myfile= {})
返回 x.myfile.file.read()