我在ubuntu操作系统下安装了pycharm,有一个keystone K版的完整代码,(没有在操作系统中安装openstack的组件,只是源码)本来在pycharm里直接运行代码目录下的keystone-all.py脚本就可以把代码跑起来,跟安装了keystone模块的服务一样,但是今天手误执行了keystone-manage.py脚本,再执行keystone-all.py时便出现了如下错误:
/usr/bin/python2.7 /home/PycharmProjects/keystone-stable-kilo/bin/keystone-all
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
msg = self.format(record)
File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
return fmt.format(record)
File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 166, in format
record.msg = six.text_type(record.msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 18: ordinal not in range(128)
Logged from file log.py, line 172
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/oslo_log/log.py", line 172, in logging_excepthook
**extra)
File "/usr/lib/python2.7/logging/__init__.py", line 1466, in critical
self.logger.critical(msg, *args, **kwargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1197, in critical
self._log(CRITICAL, msg, args, **kwargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1271, in _log
self.handle(record)
File "/usr/lib/python2.7/logging/__init__.py", line 1281, in handle
self.callHandlers(record)
File "/usr/lib/python2.7/logging/__init__.py", line 1321, in callHandlers
hdlr.handle(record)
File "/usr/lib/python2.7/logging/__init__.py", line 749, in handle
self.emit(record)
File "/usr/lib/python2.7/logging/handlers.py", line 842, in emit
msg = self.format(record) + '\000'
File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 50, in format
msg = logging.handlers.SysLogHandler.format(self, record)
File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
return fmt.format(record)
File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 166, in format
record.msg = six.text_type(record.msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 18: ordinal not in range(128)
Original exception was:
Traceback (most recent call last):
File "/home/PycharmProjects/keystone-stable-kilo/bin/keystone-all", line 36, in <module>
eventlet_server.run(possible_topdir)
File "/home/PycharmProjects/keystone-stable-kilo/keystone/server/eventlet.py", line 156, in run
serve(*servers)
File "/home/PycharmProjects/keystone-stable-kilo/keystone/server/eventlet.py", line 88, in serve
server.launch_with(launcher)
File "/home/PycharmProjects/keystone-stable-kilo/keystone/server/eventlet.py", line 54, in launch_with
self.server.listen()
File "/home/PycharmProjects/keystone-stable-kilo/keystone/common/environment/eventlet_server.py", line 109, in listen
backlog=backlog)
File "/usr/local/lib/python2.7/dist-packages/eventlet/convenience.py", line 43, in listen
sock.bind(addr)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 99] 无法指定被请求的地址
很是费解,不知道该怎么解决
|