eclipsegoogle-app-enginememcachedaptana

Aptana Studio 3 + App Engine Python + Can't resolve memcache's certain methods


I'm using Aptana Studio 3 and I've been having no problem in accessing any App Engine Api library such as urlfetch.

However, today I ran into a weird problem of Aptana or maybe I miss configured something:

from google.appengine.api import memcache

The aptana resolve the memcache import. But when I was trying to access the memcache method, the auto assist shows maximum of ONLY 7 Methods while memcache is supposed to have long list of methods.

I've verified the memcache is actually imported to Aptana by:

  1. Uploading to GAE server, and the memcache worked despite of the error highlight.
  2. I opened the memcache file, and the methods are all there.

But, Aptana Studio 3:

  1. failed to resolve the important methods --> get, set, add etc.

    missing memcache.get

  2. but, the 7 methods are resolved --> create_rpc, setup_client, _add_name_space, _decode_value, _is_pair, _key_string, _validate_encode_value

  3. Even the 7 methods which are resolved, only 2 are public while the other 5 are private methods.

  4. I opened the outline view to see what are all the methods listed in memcache python file, and realized the same 7 methods only displayed despite the codes are all there (get, set etc)

Here's what I tried to solve it:

  1. I removed all External Libraries import from project Python Path configuration and then readded back the App Engine folder.
  2. Noticeable change is only 1, in which now the outline view shows me all the right methods from the Memcache python file.
  3. However, despite the outline view is showing correctly, the methods are still not resolved. The same 7 methods are the only resolved methods.

While it's working fine in GAE, but impossible to work on an IDE that keeps highlighting the memcache methods with error.

Can anyone advice on this?


Solution

  • Solution is very simple.

    1. Add full module name 'x.x.x' to forced builtins in preference -> pydev - interpreter - Python.
    2. Restart Eclipse, rebuild or force restore internal info from project -> pydev - > python path - it depends on eclipse and configuration try first working or combo.

    See picture of it on this post http://viblogrock.wordpress.com/2011/01/01/pydev%E3%81%A7gae%E3%81%AEmemcache%E3%81%8C%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AB%E3%81%AA%E3%82%8B%E4%BB%B6/

    enter image description here

    Give answer acceptance!