1

我正在尝试为 iOS 生成 Google App Engine 发现文档,它给了我以下错误:

Traceback (most recent call last):


File "/usr/local/google_appengine/endpointscfg.py", line 133, in <module>
    run_file(__file__, globals())
  File "/usr/local/google_appengine/endpointscfg.py", line 129, in run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 561, in <module>
    main(sys.argv)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 557, in main
    args.callback(args)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 443, in _GenDiscoveryDocCallback
    application_path=args.application)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 302, in _GenDiscoveryDoc
    application_path=application_path)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 187, in GenApiConfig
    module = __import__(module_name, fromlist=base_service_class_name)
ImportError: No module named default

我正在运行以下命令

/usr/local/google_appengine/endpointscfg.py get_discovery_doc --format roc 
default.rock

另外,以下是我的 app.yaml 文件。所以我正在尝试为我的默认模块生成发现文档。此外,我在一个名为 rock.py 的文件中有一个名为 RockApi 的云端点 API,所以我的 ServiceClass 应该是什么。像上面我有default.rock。这个对吗?

application: rocky-1191
version: pre-alpha-002
runtime: python27
api_version: 1
threadsafe: yes
4

1 回答 1

1

“模块”是指您的类所在的 Python 模块,而不是 App Engine 模块。有关示例,请参阅官方文档

于 2016-01-17T01:51:54.097 回答