简体   繁体   English

VS Code Python“自动完成”和“转到定义”,GAE无法正常工作

[英]VS Code Python 'autocompletion' and 'go to definition' for GAE not working

recently I've started to use VS Code instead of sublime text 3. 最近,我开始使用VS Code而不是崇高的文字3。

But I've got small issue, neither Go To Definition nor Autocomplete works. 但是我有一个小问题,“ Go To Definition或“ Autocomplete

When I try, for example, import json then, try to json. 例如,当我尝试导入json时,尝试使用json。 it keeps saying that it's "loading" See the screenshot 它一直在说它是“正在加载”, 请参见屏幕截图

I have had simillar issues with Sublime text, but after all it found all the stuff. 我对Sublime文字有类似的疑问,但毕竟找到了所有的东西。

I'm using https://marketplace.visualstudio.com/items?itemName=donjayamanne.python and I've set all required variables. 我正在使用https://marketplace.visualstudio.com/items?itemName=donjayamanne.python,并且已经设置了所有必需的变量。 Not sure if that's package issue or my config. 不确定是软件包问题还是我的配置。

Probably it might be because project I'm in uses buildout. 可能是因为我参与的项目使用扩展。 but I've set correct way too. 但我也设定了正确的方法。 Even added extra paths for buildout .eggs directory and .parts where appengine is located. 甚至为appengine所在的.eggs目录和.parts添加了额外的路径。

Looks like it's jedi related issue. 看起来是绝地相关的问题。 Make sure you have corresponding 'grammarx.x.txt' file in ~.vscode-insiders\\extensions\\donjayamanne.python-xxx\\pythonFiles\\preview\\jedi\\parser 确保〜.vscode-insiders \\ extensions \\ donjayamanne.python-xxx \\ pythonFiles \\ preview \\ jedi \\ parser中有相应的'grammarx.x.txt'文件

I had the same issue after installing Python 3.6, so I just copied grammar3.5.txt to grammar3.6.txt in ~.vscode-insiders\\extensions\\donjayamanne.python-0.5.5\\pythonFiles\\preview\\jedi\\parser and my autocompletion started to work again. 安装Python 3.6之后,我遇到了同样的问题,因此我只是将grammar3.5.txt复制到〜.vscode-insiders \\ extensions \\ donjayamanne.python-0.5.5 \\ pythonFiles \\ preview \\ jedi \\ parser和中的grammar3.6.txt中我的自动补全功能再次开始起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM