在python中为谷歌应用引擎生成发现文档时找不到模块



我正在尝试为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 应该是什么。像上面一样,我有默认摇滚。这是对的吗?

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

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

相关内容

  • 没有找到相关文章

最新更新