在平台上开发python项目并尝试appengine endpoints。
import endpoints
抛出google.appengine.api.yaml_errors.EventError: the library "endpoints" is not supported
。完整的堆栈跟踪如下。
Traceback (most recent call last):
File "/home/action/.google_appengine/dev_appserver.py", line 182, in <module>
_run_file(__file__, globals())
File "/home/action/.google_appengine/dev_appserver.py", line 178, in _run_file
execfile(script_path, globals_)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 695, in <module>
main()
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 688, in main
dev_server.start(options)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 525, in start
options.yaml_files)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 556, in __init__
server_configuration = ServerConfiguration(yaml_path)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 82, in __init__
self._yaml_path)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 272, in _parse_configuration
return appinfo_includes.ParseAndReturnIncludePaths(f)
File "/home/action/.google_appengine/google/appengine/api/appinfo_includes.py", line 63, in ParseAndReturnIncludePaths
appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
File "/home/action/.google_appengine/google/appengine/api/appinfo.py", line 1715, in LoadSingleAppInfo
listener.Parse(app_info)
File "/home/action/.google_appengine/google/appengine/api/yaml_listener.py", line 226, in Parse
self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
File "/home/action/.google_appengine/google/appengine/api/yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: the library "endpoints" is not supported
in "./app.yaml", line 21, column 1
答案 0 :(得分:0)
从非python项目开始。
下载适用于Linux python的appengine:
curl -O http://googleappengine.googlecode.com/files/google_appengine_1.8.9.zip
在~/.bash_profile
中解压缩并导出目录:
export PATH="$HOME/google_appengine:$PATH"
构建端点python app as described并运行dev_appserver.py
。
从Nitrous.io启动时,您无法查看Google API资源管理器,除非您port forward,但您仍然可以将其用作开发端点。