ImportError:无法导入名称类型

2024-04-20 09:43:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试我从Github克隆的应用程序。在

https://github.com/sfujiwara/qa-system-sample.git (此应用使用python flask、Google自然语言API等。)

但是,我不能在谷歌应用程序上运行这个发动机。跟随发生错误。在

错误:

ImportError: cannot import name types
at <module> (/base/data/home/apps/b~qa-system-sample2/20171223t122211.406411375873194303/lib/google/cloud/language_v1/__init__.py:17)
at <module> (/base/data/home/apps/b~qa-system-sample2/20171223t122211.406411375873194303/lib/google/cloud/language.py:17)
at <module> (/base/data/home/apps/b~qa-system-sample2/20171223t122211.406411375873194303/factoid.py:5)
at <module> (/base/data/home/apps/b~qa-system-sample2/20171223t122211.406411375873194303/main.py:9)
at LoadObject (/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:85)
at _LoadHandler (/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:299)
at Handle (/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:240)

这发生在lib/google/cloud/language v1/\uu init\py中的from google.cloud.language_v1 import types。 不过,有类型.py在/lib/google/cloud/language\u v1中。在

我是python的初学者,所以我找不到原因错误。请告诉我怎么解决这个问题错误。谢谢提前。在


Tags: appspycloudhomedatabaselib错误