Google App Engine-端点故障

问题描述 投票:0回答:0

我正在尝试使用端点部署gae项目,但这给了我应该发生的错误。

我认为我的代码没有任何问题,但是在尝试部署时,我一直收到此错误:

There is a /_ah/spi handler configured, but no Google Cloud Endpoints service was found in the app

我的app.yaml:

application: app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true

# --- Handlers

handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

- url: .*
  script: main.app
  secure: always

- url: /js
  static_dir: static/js

- url: /img
  static_dir: static/img

- url: /css
  static_dir: static/bootstrap/css

- url: /fonts
  static_dir: static/fonts

- url: /partials
  static_dir: static/partials



- url: /_ah/spi/.*
  script: game.api
  secure: always


# --- Libraries

libraries:
- name: webapp2
  version: "2.5.2"

- name: pycrypto
  version: latest

- name: endpoints
  version: latest

- name: jinja2
  version: latest

和我的game.py:

from datetime import datetime

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

from google.appengine.api import memcache
from google.appengine.api import taskqueue
from google.appengine.ext import ndb

# --- Setup Code

WEB_CLIENT_ID = 'app-id'

# --- Classes

class Hello(messages.Message):
    """String that stores a message."""
    greeting = messages.StringField(1)

class TestOne(messages.Message):
    ''' TestOne message '''
    msg = messages.StringField(1)

# --- API & Endpoints

@endpoints.api(name='whoamigame', version='v1')
class WhoAmIGameApi(remote.Service):

    @endpoints.method(message_types.VoidMessage, TestOne, path='testone', http_method='GET', name='testonemethod')
    def testOneM(self, req):
        testOneMsgReturn = TestOne(msg='Test One...')
        return testOneMsgReturn



# --- API

api = endpoints.api_server([WhoAmIGameApi])

每次我尝试部署它时,端点都会失败。 我不确定如何解决此问题。 代码和语法对我来说很完美。 一切都已定义。 SDK每次都会失败。

python google-app-engine
© www.soinside.com 2019 - 2024. All rights reserved.