spacemacs打开python源文件自动补全不工作,打开anaconda-mode buffer看到以下信息:
Traceback (most recent call last): File "/Users/matthew/.emacs.d/.cache/anaconda-mode/0.1.5/service_factory-0.1.4-py2.7.egg/service_factory/providers/basehttp.py", line 40, in do_POST status, response = self.server.service(data) File "/Users/matthew/.emacs.d/.cache/anaconda-mode/0.1.5/service_factory-0.1.4-py2.7.egg/service_factory/service.py", line 50, in __call__ result = self.apply(method, args) File "/Users/matthew/.emacs.d/.cache/anaconda-mode/0.1.5/service_factory-0.1.4-py2.7.egg/service_factory/service.py", line 105, in apply server_error(args['id'], error) File "/Users/matthew/.emacs.d/.cache/anaconda-mode/0.1.5/service_factory-0.1.4-py2.7.egg/service_factory/errors.py", line 91, in server_error raise ServiceException(500, dumps(response)) ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(20, \'no such file or directory\')"}}')
环境:
OS:windows 7 ,
emacs:emacs-w64-25.1
原因:
推测因为jedi以egg文件(一个zip文件)文件安装导致IOError。
解决方法:
进入目录C:\Users\<your user name>\.emacs.d\.cache\anaconda-mode\0.1.6\,解压jedi-0.9.0-py2.7.egg到当前目录
,然后把解压出来的文件夹改名为 jedi-0.9.0-py2.7.egg, 删除或者把以前的egg文件重命名为 jedi-0.9.0-py2.7.egg.bak。
python补全就可以正常工作了。