当使用 http 请求服务端的时候,报错如下(环境 centos):
[E 170504 23:01:23 http1connection:731] Uncaught exception
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/tornado/http1connection.py", line 722, in _server_request_loop
ret = yield conn.read_response(request_delegate)
File "/usr/lib64/python2.6/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/usr/lib64/python2.6/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.6/site-packages/tornado/gen.py", line 307, in wrapper
yielded = next(result)
File "/usr/lib64/python2.6/site-packages/tornado/http1connection.py", line 159, in _read_message
max_bytes=self.params.max_header_size)
File "/usr/lib64/python2.6/site-packages/tornado/iostream.py", line 256, in read_until_regex
self._try_inline_read()
File "/usr/lib64/python2.6/site-packages/tornado/iostream.py", line 720, in _try_inline_read
self._read_from_buffer(pos)
File "/usr/lib64/python2.6/site-packages/tornado/iostream.py", line 778, in _read_from_buffer
self._run_read_callback(pos, False)
File "/usr/lib64/python2.6/site-packages/tornado/iostream.py", line 687, in _run_read_callback
future.set_result(self._consume(size))
File "/usr/lib64/python2.6/site-packages/tornado/iostream.py", line 910, in _consume
b = (memoryview(self._read_buffer)
NameError: global name 'memoryview' is not defined