Menu

Code Completion Hang

2007-03-07
2013-03-15
  • Steve Lianoglou

    Steve Lianoglou - 2007-03-07

    Hi all,

    I've just installed PyDev 1.2.9 on Mac OS X.4.8 and am having a problem with code completion hosing Eclipse.

    It seems that code completion works on some of the python builtin libraries that I have as well as other "installed" packages (like PIL, networkx to name a few).

    When I try to use completion with numpy or scipy, Eclipse just hangs -- takes up 100% of my cpu for as long as I let it before it quits. I've disabled code completeion on '.' so it doesn't kill me now, but I'm wondering if anyone else has had a problem with this?

    I clicked on the "debug completion" checkbox in the PyDev prefs, too, but I'm not sure if/where it logged any more information that I can send to you.

    Thanks,
    -steve

     
    • Steve Lianoglou

      Steve Lianoglou - 2007-03-07

      I should add that I also increased the "Timeout to connect to shell" to 60 secs with no avail.

      I saw that suggested somewhere in the docs, so I gave it a shot ...

      -steve

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2007-03-07

        Please open a bug for that (and attach the log at .metadata\.plugins\org.python.pydev.core\PydevLog.log)

        Cheers,

        Fabio

         
        • Steve Lianoglou

          Steve Lianoglou - 2007-03-07

          Hi Fabio,

          The only .metadata folder I know of would be in my Eclipse workspace, but I'm not finding any .plugins subfolder in there. Is there something I'm missing?

          -steve

           
          • Fabio Zadrozny

            Fabio Zadrozny - 2007-03-07

            Really strange... it should be the .metadata from your workspace, but it should have a .plugins folder... (make a search for .plugins and see where it comes up -- if you have a different structure)

             
    • Steve Lianoglou

      Steve Lianoglou - 2007-03-07

      Hi,

      Sorry, there is now a .metadata/.plugins folder.

      I don't want to admit that I may have been so dumb as to not turn on the 'show hidden files switch' when running ls earlier, but that's probably the case since the .plugins folder is there .. anyway ..

      I'm attaching the PydevLog file to the ticket here:
      http://sourceforge.net/tracker/index.php?func=detail&aid=1676104&group_id=85796&atid=577329

      (I had to cut down the attached log file since it was big (~14MBs) .. hopefully I didn't cut out anything useful -- I can generate it again if need be)

      As noted on the ticket, if I give PyDev a hint to the completion by starting it off with a letter, like:

      ===
      import numpy as N
      myarray = N.o<ctrl-space>
      ===

      PyDev/Eclipse doesn't hang and does its thing. Is it just the fact that numpy is a (very?) large package and trying to find every possible completion is taking so long?

      From ipython, if I do:

      import numpy as N
      N.<tab}
      ====

      It asks if I really want to show all 498 possibilities (admittedly it's a lot), but still it manages to show them w/o a hiccup.

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2007-03-08

        Take a look at the bug... I've already added some info to it...

        Cheers,

        Fabio

         
    • Steve Lianoglou

      Steve Lianoglou - 2007-03-16

      Hi Fabio,

      Just curious if you were still looking at this. The ticket is closed but I've added more comments to it recently as it still doesn't work right.

      Not only does the auto-complete not work, but more importantly it's flagging my use of the "ones" method as an error in a script like so:

      import numpy
      array = numpy.ones((10,10))

      The "ones" is underlined w/ this error: "Undefined variable from import: ones"

      I have numpy added to the "builtins" in the PyDev > Python - Interpreter preference preferences section and the path to the site-packages folder is certainly set in my environment's PYTHONPATH variable (both in Eclipse and my bash environment).

      Thanks for any updates and sorry for the hassle.

      -steve

       
    • Steve Lianoglou

      Steve Lianoglou - 2007-03-16

      Let me add to this and say that after removing numpy/scipy from the builtins and (defensively) increased the "Minimum number of chars in qualifier ..." setting to 2 (in Code Completion dlog box) everything works as expected.

      I'll be registering the PyDev Extensions now .. thanks ;-)

      -steve

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2007-03-18

        Nice to hear it's working ;-)

         
MongoDB Logo MongoDB