Wednesday, February 2, 2011

A Solution to HW2

The program I discussed in class today can be found here.

9 comments:

  1. When I was running the HW2 solution and clicking on the account link I got this error

    Traceback (most recent call last):
    File "D:\google_appengine\google\appengine\ext\webapp\__init__.py", line 515, in __call__
    handler.get(*groups)
    File "D:\workspace\AccountDemo\src\Main.py", line 48, in get
    logging.info('theUser=%s' % theUser.name) #nice debugging tool
    AttributeError: 'NoneType' object has no attribute 'name'

    ReplyDelete
  2. This is a null pointer exception

    ReplyDelete
  3. Yes, theUser is None. I should move that debugging line (the loggging,debug) down a couple of lines to just after the 'if theUser:' . Ok, I just did.

    ReplyDelete
  4. btw, how come every time I am trying to deploy the files to my account, I got denied and asked for permission Thankx

    ReplyDelete
  5. appcfg.py needs your username+password so it can login to your google account and publish your app (otherwise, everyone could overwrite you published webapp).

    I've noticed that if I publish from the command line (appcfg.py) then it will remember by password for a short time, but if I come back the next day I have to login again. I think the GUI frontend to appcfg (on my mac) does not remember my password, but maybe that's because I am not using keychain (a Mac thing).

    If you can't every publish then, that's a problem. I don't know.

    ReplyDelete
  6. What I did was to click the DEPLOY button on app engine penal like what you did in the lecture as I remember. Then type in my account info and password. But every time I got denied... Thanx

    ReplyDelete
  7. I don't know. Google is not letting you log in. Either you are typing your password wrong or there is a problem at the google.

    This is the same username/password you use to log into www.appspot.com

    If the problem persists, post it on the google app engine group so they can take a look.

    You can also try to create another google account and try it with that one.

    ReplyDelete
  8. Maybe, you don't have the right name of the application in your yaml file.It should be the name you gave the application in your google appengine account, not helloworld or anything.

    ReplyDelete