Reputation: 61
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.com
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.
Upvotes: 6
Views: 14848
Reputation: 1715
You can make the URL entry as below to give you more flexibility when creating your url routing table
- url: .*
script: main.app
Upvotes: 0
Reputation: 8287
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)
Upvotes: 4