Google App Engine错误(请求的URL /在此服务器上找不到)

编程入门 行业动态 更新时间:2024-10-20 09:29:38
本文介绍了Google App Engine错误(请求的URL /在此服务器上找不到)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试创建一个简单的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.2

main.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: /udacityassignment2

And as Tim pointed, the mapping should be

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

更多推荐

Google App Engine错误(请求的URL /在此服务器上找不到)

本文发布于:2023-10-31 15:57:42,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:在此   找不到   器上   错误   App

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!