谷歌应用引擎的第一天。
我的yaml文件包括以下内容:

application: testProgram
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: main.py

libraries:
- name: webapp2
  version: "2.5.2"

我的python文件包括以下内容(仅用于giggles):
import webapp2


class MainPage(webapp2.RequestHandler):
    def get(self):
        self.reponse.headers['Content-Type'] = 'text/plain'
        self.response.out.write("Hurray for cake!")


app = webapp2.WSGIApplication([('/', MainPage)],debug=True)

我得到的错误如下:
ile "/home/rickus/google_appengine/google/appengine/api/yaml_listener.py", line 178, in _HandleEvents
    raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: Unable to assign value 'testProgram' to attribute 'application':
Value 'testProgram' for application does not match expression '^(?:(?:[a-z\d\-]{1,100}\~)?(?:(?!\-)[a-z\d\-\.]{1,100}:)?(?!-)[a-z\d\-]{0,99}[a-z\d])$'
  in "testProgram/app.yaml", line 1, column 14

所以它在抱怨我文件的命名不可能吧?我有什么想法吗?

最佳答案

它很可能抱怨您的applicationId,看看regex,它只接受小写字符。
将applicationId更改为“test program”或“testprogram”

07-26 00:28