I entered the following script into the gae "interactive console" and
got the error message below. Verify this is an error and tell me what
I am doing wrong, please.

Brian in Atlanta

***************************script below*****
from google.appengine.ext import db

class Log(db.Model):
  comment = db.StringProperty()
  job =  db.StringProperty()
  category = db.IntegerProperty(default=0)

log = Log(key_name="billy",job="write",comment="good work")
print log.job
print log.category

key = db.Key.from_path("Log","billy")
log = Log.get(key)
print log.category

log.job = "read"
log.category += 1
log.put()

key = db.Key.from_path("Log",'billy')
log = Log.get(key)
print log.job
print log.category
***************************script above*****

***************************error below*****
write
0
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/admin/__init__.py", line 194, in post
    exec(compiled_code, globals())
  File "<string>", line 14, in <module>
AttributeError: 'NoneType' object has no attribute 'category'
***************************error above*****


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to