遇到奇怪的问题:web.py 0.40中使用web.input(),出现一堆奇怪的错误
阅读原文时间:2023年07月09日阅读:1

有的请求很正常,有的请求就出现了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