输入vim时会报一下异常:
Error detected while processing function <SNR>115_PollServerReady[7]..<SNR>115_Pyeval:
line 4:
/usr/lib/python2.7/dist-packages/OpenSSL/_util.py:6: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be
removed in the next release.
接着每次输入q 退出vim界面时也会接着报以下异常:
error detected while processing function <SNR>115_OnBufferUnload:
line 8:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/tzf/.vim/plugged/YouCompleteMe/python/ycm/youcompleteme.py", line 465, in OnBufferUnload
SendEventNotificationAsync( 'BufferUnload', deleted_buffer_number )
File "/home/tzf/.vim/plugged/YouCompleteMe/python/ycm/client/event_notification.py", line 69, in SendEventNotificationAsync
event.Start()
File "/home/tzf/.vim/plugged/YouCompleteMe/python/ycm/client/event_notification.py", line 45, in Start
'event_notification' )
File "/home/tzf/.vim/plugged/YouCompleteMe/python/ycm/client/base_request.py", line 137, in PostDataToHandlerAsync
return BaseRequest._TalkToHandlerAsync( data, handler, 'POST', timeout )
File "/home/tzf/.vim/plugged/YouCompleteMe/python/ycm/client/base_request.py", line 152, in _TalkToHandlerAsync
return BaseRequest.Session().post(
File "/home/tzf/.vim/plugged/YouCompleteMe/python/ycm/client/base_request.py", line 196, in Session
from requests_futures.sessions import FuturesSession
File "/home/tzf/.vim/plugged/YouCompleteMe/third_party/requests-futures/requests_futures/sessions.py", line 24, in <module>
from requests import Session
File "/home/tzf/.vim/plugged/YouCompleteMe/third_party/requests_deps/requests/requests/__init__.py", line 95, in <module>
from urllib3.contrib import pyopenssl
原因: openSSL 库出问题
按以下步骤进行修复:
$ sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSL
$ sudo rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info
$ pip install pyopenssl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com