Jump to content


Photo

Testing Gae In Ch 10 Results In Error


  • Please log in to reply
4 replies to this topic

#1 jishen

jishen

    New Member

  • Members
  • Pip
  • 3 posts

Posted 12 April 2013 - 10:43 AM

Hi,

Trying to follow the book in Ch. 10 Pg. 356. When I try to start the app from the GAE Launcher, it complains with the following:

google.appengine.api.yaml_errors.EventListenerYAMLError: mapping values are not allowed here
  in "C:\pyex\mygaetest\app.yaml", line 7, column 11
2013-04-12 11:29:56 (Process exited with code 1)

My app.yaml is like this:

application: mygaetest
version: 1
runtime: python
api_version: 1
handlers:
- url /.*
    script: sayhello.py


Am I doing something wrong? Thanks! :unsure: :huh:

#2 jishen

jishen

    New Member

  • Members
  • Pip
  • 3 posts

Posted 12 April 2013 - 03:28 PM

Ugh. I feel silly. I missed the ":" in the "url" and "/.*"

The circle around "/.*" practically hid the colon from view on the page.

I also had to add a line "threadsafe: no" to the app.yaml file before it would work.

Thanks anyway!

Edited by jishen, 12 April 2013 - 03:29 PM.


#3 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 16 April 2013 - 05:17 AM

The reason you need the "threadsafe" line is that Google added it as a requirement for Python 2.7 support. At the time the book published, only 2.5 was available. I am currently writing the second edition of this book, and you'll be glad to know that I'm making much less use of those little circles. Sorry that tripped you up.

Regards.

--Paul.

#4 jishen

jishen

    New Member

  • Members
  • Pip
  • 3 posts

Posted 16 April 2013 - 02:19 PM

It's ok. The circles don't bother me... Had it been shifted 1mm over, I would've seen the colon, and wouldn't have gotten caught out. Thank you for the reply anyway! :)

Now I'm stuck trying to get the birth date Django forms example working, but I saw your post in another thread stating that GAE no longer supports Django. :o I guess that means I probably won't be able to do the hfwwg exercise as well.

Could this be the reason why it's blowing up, or is it a Python 2.5 vs Python 2.7 thing again? In either case, it looks like I am having a harder time following along now. I guess I have to keep practicing on my own or with some of the other books you mentioned. It's a shame, because I really enjoyed this book.

Oh well. I understand things have changed since the time the book was published. It's ok. That's life. :) My fault for coming to it so late. hehe I still learned a lot however, so thank you very much!

#5 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 17 April 2013 - 12:11 AM

App Engine will still run a Python 2.5 application (I have the HFWWG webapp running here: http://hfwwgapp.appspot.com). Granted, GAE complains when I log in to the admin site that I'm running on the 2.5 runtime (which is deprecated) but, it still runs. Worth a look.

You can install different versions of Python on your computer and they will not interfere with each other. I have 2.5, 2.7 and 3.3 running on all of mine with no issues.

Regards, and thanks for the kind words about my book.

--Paul.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users