user1340596
user1340596

Reputation: 65

memcache in google app engine

I am having an application developed in python and google app engine, but when i am try to customize this application then it is giving me compile time error in the previous code which is running fine on live. Code is:

if version in ['beta', 'alpha'] :
            type=version
            version = memcache.get(type)
            if not version:
                v = RouterVersions.get_by_key_name(type)
                if not v : 
                    logging.error('No version found in RouterModel for %s', type)
                    self.error(404)
                    return;

                version = v.version
                memcache.add(v.type, version) 

whenver i am using memcache.add or get property it is giving compile time error "undefined variable from import get". I am not able to know why is it so. I am new to python and google app engine. My application was created in python 2.5 and i am using 2.7 now. Is that the issue or something else ?

Upvotes: 3

Views: 652

Answers (1)

Guido van Rossum
Guido van Rossum

Reputation: 16890

Did you perhaps name a file memcache.py? If so remove it and also memcache.pyc.

Upvotes: 8

Related Questions