有的请求很正常,有的请求就出现了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. windows生成ssh上传git代码

    打开 执行 ssh-keygen -t rsa -C "email@email.com" #换成你的git登录账号 中间肯会有提示确认的 然后在 C:\Users(用户)\你电脑用 ...

  2. Kafka安装Kafka-Eagle可视化界面

    要先安装jdk 可以参考:https://www.cnblogs.com/pxblog/p/10512886.html 下载 http://download.kafka-eagle.org/ 上传到服 ...

  3. c++设计模式概述之工厂

    类写的不规范,原因: 缩短篇幅,实际中请不要这样写. 欢迎指正 工厂模式,如其名,想象下现实生活中的工厂,比如Apple的组装工厂,小米产品的组装工厂,华为设备的组装工厂.对我们用户而言,不需要知道他 ...

  4. 一个自定义的c++错误类 和 同步异步、阻塞非阻塞(区别简述)

    一个例子,自定义exception 继承std::exception 1 class _oct_udp_api_export_ udp_err : public std::exception 2 { ...

  5. 【LeetCode】520. Detect Capital 解题报告(Java & Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 循环判断三个条件 大写字母个数和位置判断 根据首字符 ...

  6. 【LeetCode】690. Employee Importance 解题报告(Python)

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

  7. 【LeetCode】14. Longest Common Prefix 最长公共前缀

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 个人公众号:负雪明烛 本文关键词:prefix, 公共前缀,题解,leetcode, 力扣 ...

  8. 【LeetCode】652. Find Duplicate Subtrees 解题报告(Python)

    [LeetCode]652. Find Duplicate Subtrees 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id: fuxuemingzhu 个人博 ...

  9. 教学日志:javaSE-面向对象2

    一.局部变量和成员变量 package class4.oop1; /** * @Auther: Yu Panpan * @Date: 2021/12/10 - 12 - 10 - 14:47 * @D ...

  10. Codeforces 876B:Divisiblity of Differences(数学)

    B. Divisiblity of Differences You are given a multiset of n integers. You should select exactly k of ...