Pylance在我重新安装Windows后显示Google的错误。
from google.appengine.ext import ndb
class Example(ndb.Model):
basic_example = ndb.StringProperty()第一个问题,由进口上升:
导入"google.appengine.ext“无法解决Pylance (reportMissingImports)
我需要为Cloud添加extraPaths。我见过/尝试过各种解决方案,并发现这是有效的:
{ // settings.json
"python.analysis.extraPaths": [
"C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/platform/google_appengine"
],
"python.autoComplete.extraPaths": [
"C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/platform/google_appengine"
]
}当前问题,在何处使用库;所有代码。
“模型”不是模块Pylance (reportGeneralTypeIssues)的已知成员
"StringProperty“不是模块Pylance (reportGeneralTypeIssues)的已知成员。
我看不出前进的路。
发布于 2021-08-09 08:13:56
该项目运行Python2.7,而Pylance则需要3.0。
https://stackoverflow.com/questions/68679884
复制相似问题