pylint E4010:无法导入“ google.appengine.ext”

时间:2018-08-29 08:00:27

标签: visual-studio-code

我的烧瓶应用程序中有这些导入文件。

from google.appengine.ext import deferred
from google.appengine.api.taskqueue import TaskRetryOptions
from google.appengine.ext import ndb

我遇到了错误: enter image description here 在settings.json上说:

// List of paths to libraries and the like that need to be imported by auto complete engine. E.g. when using Google App SDK, the paths are not in system path, hence need to be added into this list.
  "python.autoComplete.extraPaths": []

所以我尝试了:

{
    "python.autoComplete.extraPaths": ["/Users/macbookpro/Developer/google-cloud-sdk/platform/google_appengine/google/appengine.ext"]
}

但是它不能解决问题。 如何修复pylint错误? 我在Mac OS High Sierra上,使用Visual Studio Code。

1 个答案:

答案 0 :(得分:0)

尝试从路径中删除 /google/appengine.ext 。重新启动VSCode。