Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

wx autocompletion problems

2010-04-26
2013-03-15
  • Tim Diggins
    Tim Diggins
    2010-04-26

    Hi Fabio & others -

    I've search and looked several places (like https://sourceforge.net/projects/pydev/forums/forum/293649/topic/2895738 for example) but can't fix this one (though I  feel like it was working before…)

    I can't get wx to autocomplete. I've removed/added python, I've removed/added the explicit wx path, I've removed/added wx/wxPython from the Forced Builtins, I've tried rebuilding the project, I've "force restore internal info" on the project.

    anything else to try? While wx imports ok, all usages of wx. are marked with not found in import. weirdly I can get autocompletions for wx. in the Pydev Console, just not in .py files.

    2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) \n
    I've got wx 2.8.10.1 installed and am running eclipse 3.5.2, pydev 1.5.5 (and aptana stuff) , on Mac OS 10.5.8 with my main python being 2.6.4

    sys.executable:
    /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
    sys.version:
    2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) \n

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2010-04-29

    Hi Tim,

    The configuration should be with wx and wxPython in the forced builtins (as it needs to be analyzed with a shell).

    Have you checked if you have something in your error log? (see http://pydev.org/faq.html#how_do_i_report_a_bug for details on obtaining it).

    Cheers,

    Fabio

     
  • Tim Diggins
    Tim Diggins
    2010-05-05

    Hi Fabio (sorry for delay - somehow missed your reply) -

    I've checked the error log - there are some errors to do with Radrails/RDT (org.rubypeople.rdt.*) and the aptana studio stuff (both of which I use) but nothing to do with pydev (apart from a keybinding conflict).

    Is the fact that I get completion in the console a clue?

    T

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2010-05-05

    > Is the fact that I get completion in the console a clue?

    Not really… having a live shell always there makes things a bit different from the code-completion where the static/dynamic analyzers mix.

    Can you do an experiment for trying to determine the cause?

    1. Check 'enable logging for code-completion' at preferences > pydev > logging.
    2. Grab the latest nightly build (which should be the final 1.5.7) - that version is needed because I added some logging info there (install and restart).
    3. Remove and re-add your current interpreter, making sure that the pythonpath is correct and wx and wxPython are in the forced builtins
    4. Create an empty file and try to do a code-completion using wx and paste the results you get in the Pydev Logging console (it should appear in the console view).

    Cheers,

    Fabio

     
  • Tim Diggins
    Tim Diggins
    2010-05-05

    Ok - I was able to get it to work in a new workspace with a new Pydev module, and this got me wondering.

    I then redeleted my interpreter and added it again but DIDN'T rename it from the setting (by default it has the path as the name, I've been changing it to "Python2.6" to make it work across machines/platforms (we're using the same projects on mac and windows on different machines)).

    It now works… (rejoice! and I've tested it on pydev 1.5.5 on another machine - so it wasn't 1.5.7)

    I wonder if it was because of my project's interpreter being targeted not at default, but at a named version (which I then reloaded)?

    But I've tried (perversely, for debugging reasons) to make the problem  come back, and I can't, so I'm not sure.

    Anyway - thanks for the help.

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2010-05-05

    Nice that it works now ;-)

    What I can say is that the current 1.5.7 does fix one issue that could go wrong in the interpreter configuration, if you configured the same interpreter with a different name (the fix is not allowing that anymore), because although the name can be changed, internally it still uses the interpreter location for uniquely identifying the interpreter.

    If you have a case where multiple configurations of the same interpreter are needed, virtualenv is recommended - or on case-independent filesystems you could just change a case within the filename for the path - but don't do that, virtualenv is a better solution :)

    So, I'm guessing that was the culprit in your situation.

    Cheers,

    Fabio