views:

76

answers:

1

I've been developing an AppEngine site which uses the Expando class to store info. I can successfully store a property in the development server. I verify the info is there with the developer (web) console, but when I run code I have the following problems:
- the hasattr(myobj, attr_name) function returns false
- the getattr(myobj, attr_name) function throws an exception
- myobj.attr_name throws an exception
- myobj.dynamic_properties() returns an empty list

All of these happen while the development (web) console reports the property is still there.

Also, if I set a new property (and commit it to the datastore) the old property disappears. This class was recently changed from a db.Model subclass to an Expando subclass. More strangely, another Expando subclass properly reports its dynamic properties.

I've re-installed the dev server (GoogleAppEngineLauncher 1.1.9 on Mac OS X 10.5.6) and cleared the datastore with no luck. I'm kind of stuck.

A: 

I figured this out. Apparently I was using the superclass'

Model.get('key')

method, instead of

db.get('key')

Duh.

pat