有的请求很正常,有的请求就出现了500错误。

这里使用POST请求,然后在web.input()中出现了很长很长的错误。

猜测是这个机器上安装了python2.7 / python 3.6 / python3.7, 可能是版本太多导致某个点出错。

暂时想不到该如何解决……

=============================

16:53补充:

这里提到了这个问题,但是替换cgi.py这个文件并未解决问题

https://github.com/webpy/webpy/issues/574

具体的错误信息如下:

Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 289, in process
return self.handle()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "../public_module/schema_base.py", line 155, in POST
return self._execute(True)
File "../public_module/schema_base.py", line 34, in _execute
param = web.input()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 289, in process
return self.handle()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "../public_module/schema_base.py", line 155, in POST
return self._execute(True)
File "../public_module/schema_base.py", line 34, in _execute
param = web.input()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 289, in process
return self.handle()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "../public_module/schema_base.py", line 155, in POST
return self._execute(True)
File "../public_module/schema_base.py", line 34, in _execute
param = web.input()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 289, in process
return self.handle()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "../public_module/schema_base.py", line 155, in POST
return self._execute(True)
File "../public_module/schema_base.py", line 34, in _execute
param = web.input()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 716, in processor
result = handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 289, in process
return self.handle()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "../public_module/schema_base.py", line 155, in POST
return self._execute(True)
File "../public_module/schema_base.py", line 34, in _execute
param = web.input()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 716, in processor
result = handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes TypeError('write() argument must be str, not bytes',)
Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 289, in process
return self.handle()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "../public_module/schema_base.py", line 155, in POST
return self._execute(True)
File "../public_module/schema_base.py", line 34, in _execute
param = web.input()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 716, in processor
result = handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in process
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 699, in processor
return handler()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 287, in <lambda>
return p(lambda: process(processors))
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/cheroot-8.2.1-py3.6.egg/cheroot/server.py", line 1280, in communicate
req.respond()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/cheroot-8.2.1-py3.6.egg/cheroot/server.py", line 1083, in respond
self.server.gateway(self).respond()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/cheroot-8.2.1-py3.6.egg/cheroot/wsgi.py", line 143, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/httpserver.py", line 306, in __call__
return self.app(environ, xstart_response)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/httpserver.py", line 273, in __call__
return self.app(environ, start_response)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 328, in wsgi
result = self.handle_with_processors()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 299, in handle_with_processors
return process(self.processors)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 296, in process
raise self.internalerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/application.py", line 587, in internalerror
return debugerror()
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 333, in debugerror
return web._InternalError(djangoerror())
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 322, in djangoerror
return t(exception_type, exception_value, frames)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 986, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/template.py", line 897, in __call__
return self.t(*a, **kw)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/debugerror.py", line 193, in __template__
</ol>
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 468, in input
out = rawinput(_method)
File "/data/home/ahfuzhang/.local/lib/python3.6/site-packages/web/webapi.py", line 444, in rawinput
a = cgi.FieldStorage(fp=fp, environ=e, keep_blank_values=1)
File "/usr/lib64/python3.6/cgi.py", line 566, in __init__
self.read_single()
File "/usr/lib64/python3.6/cgi.py", line 757, in read_single
self.read_binary()
File "/usr/lib64/python3.6/cgi.py", line 779, in read_binary
self.file.write(data)
TypeError: write() argument must be str, not bytes

遇到奇怪的问题:web.py 0.40中使用web.input(),出现一堆奇怪的错误的更多相关文章

  1. 返璞归真 asp.net mvc (11) - asp.net mvc 4.0 新特性之自宿主 Web API, 在 WebForm 中提供 Web API, 通过 Web API 上传文件, .net 4.5 带来的更方便的异步操作

    原文:返璞归真 asp.net mvc (11) - asp.net mvc 4.0 新特性之自宿主 Web API, 在 WebForm 中提供 Web API, 通过 Web API 上传文件, ...

  2. web.py 学习(-)Rocket web框架

    Rocket是一个轻量级,多线程,符合WSGI规范的web框架. Rocket使用一个线程监听连接,接收到连接之后放到Queue中,有worker线程进行处理. Rocket含有以下属性: metho ...

  3. web.py网页模板中使用jquery

    由于$是web.py针对模板的保留字符,所以在模板文件内不能直接使用$("#id")的格式. 解决办法: 1.$$("#id")可以避免$被误解析 2.jque ...

  4. Tomcat翻译--Tomcat Web Application Deployment(Tomcat中部署web应用)

    原文:http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html Introduction(介绍) Deployment is the te ...

  5. tomcat下的web.xml和项目中的web.xml

    Tomcat 服务器中存在一个web.xml文件 在项目文件夹中同样存在一个web.xml文件 那这两个文件有什么区别呢? tomcat中的web.xml是通用的,如果不设置,那么就会默认是同tomc ...

  6. Windows下安装Web.py快速指南

    环境介绍 首先介绍下安装使用的环境 - Windows 7 - Python 3.6 Web.py介绍 web.py是Python在Web领域一个轻量级的解决方案,所谓轻量,就是非常简单快速满足Web ...

  7. python3.X 安装web.py 失败的解决方法

    python2.x 安装python是非常顺利的 但是 在进行 pip3 install web.py 时提示很多错误 例如缺少模块 语法错误...... 最后试了一下web.py 的dev版本 pi ...

  8. python3使用web.py遇到的找不属性的错误解决

    今天用pyhon安装完web.py的时候,点击运行还是没错的,但是在网页输入链接就会报错.1.安装我是这样的: pip install web.py 2.运行后错误信息是这样: AttributeEr ...

  9. Windows下Nginx+Web.py+FastCGI服务搭建

    在搭建之前,有必要了解下什么是fastcgi,但鉴于我自己也不大了解,这里就不搬门弄斧了,请参考各种百科和官网资料. 1.资源下载 python下载地址:戳这里webpy下载地址:戳这里flup下载地 ...

随机推荐

  1. 使用.NET 6开发TodoList应用(5.1)——实现Repository模式

    需求 经常写CRUD程序的小伙伴们可能都经历过定义很多Repository接口,分别做对应的实现,依赖注入并使用的场景.有的时候会发现,很多分散的XXXXRepository的逻辑都是基本一致的,于是 ...

  2. JAVA获取本机的MAC地址

    /** * 获取本机的Mac地址 * @return */ public String getMac() { InetAddress ia; byte[] mac = null; try { // 获 ...

  3. MacOS设置终端代理

    前言 国内的开发者或多或少都会因为网络而烦恼,因为一些特殊原因有时候网络不好的时候需要使用代理才能完成对应的操作.原来我一直都是使用斐讯路由器然后刷了梅林的固件,直接在路由器层面设置转发代理,把一些国 ...

  4. cmake命令行生成32位和64位项目

    概述 本文演示环境: win10 + VS2017 1.指定变量值 咱们常用命令[cmake ..]在build目录下配置生成项目和解决方案. 其实,这个命令还有其他用法. 指定CMakeLists. ...

  5. 【LeetCode】366. Find Leaves of Binary Tree 解题报告 (C++)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 DFS 日期 题目地址:https://leetcod ...

  6. 【LeetCode】323. Number of Connected Components in an Undirected Graph 解题报告 (C++)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 并查集 日期 题目地址:https://leetcod ...

  7. 【LeetCode】22. Generate Parentheses 括号生成

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 个人公众号:负雪明烛 本文关键词:括号, 括号生成,题解,leetcode, 力扣,Pyt ...

  8. 【LeetCode】260. Single Number III 解题报告(Python & C++)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 异或 字典 日期 题目地址:https://leet ...

  9. 【LeetCode】371. Sum of Two Integers 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 位运算 日期 题目地址:https://leetco ...

  10. hdu-4561 连续最大积( 水题)

    http://acm.hdu.edu.cn/showproblem.php?pid=4561 求连续最大积. 他妈的狗逼思路到底咋说..... 思路是 %&*()*(&--))*)*& ...