我正在尝试创建一个简单的Web应用程序,指出Hello Udacity并将其上传到Google App Engine,但是我一直在收到一些错误。
来自Google App Engine的错误消息:
11:57 PM主持人:appengine.google 解析yaml文件时出错:无法将值'udacityassignment2'分配给'url'属性: url的值'udacityassignment2'与表达式不匹配'^(?:( ?! \ ^) /.*|\..*|(\(.).*(?!\$).)$' inC:\Users\Wealthy\Desktop\ambhelloworld\\ \\udacityassignment2\app.yaml,第12行,第8列 2013-05-27 23:57:00(程序退出时带有代码1) 您现在可以关闭此窗口。app.yaml:
应用程序:udacityassignment2 版本:1 运行时:python27 api_version:1 线程安全:是 处理程序: - url:/ favicon \。 ico static_files:favicon.ico 上传:favicon\.ico - url:udacityassignment2 脚本:main.app 库: - name:webapp2 version:2.5.2main.py:
import webapp2 $ b $ class MainHandler(webapp2。 RequestHandler): def get(self): self.response.write('Hello Udacity!') app = webapp2.WSGIApplication([(' /',MainHandler)],debug = True)Google App Engine
错误:未找到在此服务器上找不到请求的URL。有关如何解决此问题的任何帮助,我们将不胜感激。
<该错误表明您的app.yaml中的 url 条目无效。解决方案
试试这个
url:/ udacityassignment2正如Tim指出的那样,映射应该是 app = webapp2.WSGIApplication([('/ udacityassignment2',MainHandler)],debug = True)
I am trying to create a simple web application that says Hello Udacity and upload it to Google App Engine, but I keep on getting a bunch of errors.
Error message from Google App Engine:
11:57 PM Host: appengine.google Error parsing yaml file: Unable to assign value 'udacityassignment2' to attribute 'url': Value 'udacityassignment2' for url does not match expression '^(?:(?!\^)/.*|\..*|(\(.).*(?!\$).)$' in "C:\Users\Wealthy\Desktop\ambhelloworld\udacityassignment2\app.yaml", line 12, column 8 2013-05-27 23:57:00 (Process exited with code 1) You can close this window now.app.yaml:
application: udacityassignment2 version: 1 runtime: python27 api_version: 1 threadsafe: yes handlers: - url: /favicon\.ico static_files: favicon.ico upload: favicon\.ico - url: udacityassignment2 script: main.app libraries: - name: webapp2 version: "2.5.2"main.py:
import webapp2 class MainHandler(webapp2.RequestHandler): def get(self): self.response.write('Hello Udacity!') app = webapp2.WSGIApplication([ ('/', MainHandler) ], debug=True)Google App Engine console:
Error: Not Found The requested URL / was not found on this server.Any assistance on how to correct this issue would be appreciated.
解决方案The error is indicating that the url entry in your app.yaml is not valid. Try this
url: /udacityassignment2And as Tim pointed, the mapping should be
app = webapp2.WSGIApplication([ ('/udacityassignment2', MainHandler) ], debug=True)
更多推荐
Google App Engine错误(请求的URL /在此服务器上找不到)
发布评论