memcache compiler error

98 views
Skip to first unread message

ogterran

unread,
Apr 21, 2010, 11:49:47 PM4/21/10
to appengine-utilities
Hi,
I downloaded the latest gaeutilities 1.4 and google app engine 1.3.3
In cache.py, line 202, 238, 279, etc, i get a compiler error on
memcache.delete(), memcache.set() functions.

Looking in google.appengine.api.memcache init.py, the set and delete
function is part of the Client class.

Can I modify to memcache.delete() to memcache.Client().delete() ?
Or am I missing something?

Thanks
Jon

--
You received this message because you are subscribed to the Google Groups "appengine-utilities" group.
To post to this group, send email to appengine...@googlegroups.com.
To unsubscribe from this group, send email to appengine-utili...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/appengine-utilities?hl=en.

Joe Bowman

unread,
Apr 22, 2010, 7:08:18 AM4/22/10
to appengine-utilities
Can you post some sample code the duplicates the problem? I will see
if I can take a look this evening.

ogterran

unread,
Apr 23, 2010, 3:33:38 AM4/23/10
to appengine-utilities, jonath...@gmail.com
Hi Joe,

I get this compiler error below
Undefined variable from import: get cache.py line 295

I think it is due to GAE changing how memcache is set/get/deleted
In google/appengine/api/memcache/init.py, the get function moved
inside the Client class.

There are similar errors like this with memcache.

Thanks
Jon

ogterran

unread,
Apr 23, 2010, 2:06:46 AM4/23/10
to appengine-utilities
Hi Joe,

Here is one of the errors from PyDev. There are more errors similar to
this
Undefined variable from import: get cache.py line 295

in cache.py line 295
mc = memcache.get('cache-%s' % (key))

In google/appengine/api/memcache/init.py from GAE version 1.3.3
the get() function is moved into the class Client

What version is gaeutilities 1.4 compatible with GAE version?

Thanks
Jon

On Apr 22, 4:08 am, Joe Bowman <bowman.jos...@gmail.com> wrote:

Joe Bowman

unread,
Apr 23, 2010, 7:15:45 AM4/23/10
to appengine-utilities
1.4 is compatible with 1.3.2. 1.3.3 was released a couple hours after
i released 1.4, go figure.

i should have some time tonight to resolve this.

Joe Bowman

unread,
Apr 23, 2010, 9:07:29 AM4/23/10
to appengine-utilities
By the way, they must have some sort of wrapper on the live site,
because the demo still works correctly. http://gaeutilities.appspot.com/cache

I'll work on reproducing the bug tonight.

ogterran

unread,
Apr 24, 2010, 1:53:38 AM4/24/10
to appengine-utilities, jonath...@gmail.com
This turned out to be a PyDev problem. The code is working fine.
In google/appengine/api/memcache/init.py, the function setup_client()
in line 1011, sets up the global variables.
Not sure why PyDev didn't catch that.
There is an bug filed for this already
http://code.google.com/p/googleappengine/issues/detail?id=2689

Thanks Joe for your time and sorry about the false alarm!

On Apr 23, 6:07 am, Joe Bowman <bowman.jos...@gmail.com> wrote:
> By the way, they must have some sort of wrapper on the live site,
> because the demo still works correctly.http://gaeutilities.appspot.com/cache
Reply all
Reply to author
Forward
0 new messages