2

在尝试时appcfg.py update myProject,我的端点无法更新。这是跟踪的一部分:

09:36 PM Failed to update Endpoints configuration.  The app returned an error when the Google Cloud Endpoints server attempted to communicate with it.
09:36 PM See the deployment troubleshooting documentation for more information: https://developers.google.com/appengine/docs/python/endpoints/test_deploy#troubleshooting_a_deployment_failure
09:36 PM Ignoring Endpoints failure and proceeding with update.

我试图检查日志http://localhost:8080/_ah/spi/BackendService.getApiConfigs,但终端产生以下错误:

@endpoints.api(name='EventsAPI', version='v1')
AttributeError: 'module' object has no attribute 'api'
INFO     2016-03-18 02:01:37,742 module.py:787] default: "GET /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 500 -

这是我的代码:

import endpoints
from protorpc import messages
from protorpc import message_types
from protorpc import remote

package = 'Events'

@endpoints.api(name='EventsAPI', version='v1')
class EventsAPI(remote.Service):
    # insert lots of endpoint methods

APPLICATION = endpoints.api_server([EventsAPI])

我正在关注本教程。我哪里做错了?

4

2 回答 2

1

供参考,如端点定义中所述。

名称值:必须以小写字母开头。

于 2016-03-18T17:00:48.490 回答
1

端点名称有问题。名称EventsAPI无效;更改它以eventsapi解决此问题。

于 2016-03-18T02:36:36.860 回答