Help me , why code completion does not work!

2008-02-29
2013-03-15
  • clinuxsir clinux

    I use pydev 1.3.13 with eclipse 3.3, when I edit python source file, I cannot get code completion working,
    The Exception in log file is

    !MESSAGE java.lang.RuntimeException: Unable to find an unused local port (is your firewall enabled?) [host:127.0.0.1 from:50000 to:55000]
    !STACK 0
    java.lang.RuntimeException: java.lang.RuntimeException: Unable to find an unused local port (is your firewall enabled?) [host:127.0.0.1 from:50000 to:55000]
        at org.python.pydev.editor.codecompletion.PyCodeCompletion.lazyStartShell(PyCodeCompletion.java:329)
        at org.python.pydev.editor.codecompletion.PyCodeCompletion.getCodeCompletionProposals(PyCodeCompletion.java:105)
        at org.python.pydev.editor.codecompletion.PythonCompletionProcessor.getPythonProposals(PythonCompletionProcessor.java:246)
        at org.python.pydev.editor.codecompletion.PythonCompletionProcessor.computeCompletionProposals(PythonCompletionProcessor.java:177)
        at org.python.pydev.editor.simpleassist.SimpleAssistProcessor.computeCompletionProposals(SimpleAssistProcessor.java:172)
        at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1759)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:478)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:475)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:410)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:404)
        at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:354)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
        at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    Caused by: java.lang.RuntimeException: Unable to find an unused local port (is your firewall enabled?) [host:127.0.0.1 from:50000 to:55000]
        at org.python.pydev.plugin.SocketUtil.findUnusedLocalPort(SocketUtil.java:51)
        at org.python.pydev.editor.codecompletion.shell.AbstractShell.startIt(AbstractShell.java:341)
        at org.python.pydev.editor.codecompletion.shell.AbstractShell.startIt(AbstractShell.java:312)
        at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:234)
        at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:192)
        at org.python.pydev.editor.codecompletion.PyCodeCompletion.lazyStartShell(PyCodeCompletion.java:323)
        ... 35 more

    I disable My winxp firewall
    I download the SocketUtil.java from CVS , I run the method org.python.pydev.plugin.SocketUtil.findUnusedLocalPort , It can get the correct port, and dose not throw any runtime exception,
    But the code completion dose not work ,
    Why? Please help me
    Thanks a  lot!

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2008-02-29

      Hummm, I'm not sure why it's able to get a connection in your test and not from within eclipse... that's usually a firewall in the way (could you double-check you don't have any other firewall enabled which could be allowing java.exe to create it but not javaw.exe or eclipse.exe).

      I've just seen that the SocketUtil version of java changed, so, I might try to change pydev to use the same version JDT is using (and see if that solves your problems).

      Cheers,

      Fabio

       
    • clinuxsir clinux

      Thank a a lot ,
      I have solved the problem , I delete the eclipse from blocking list of viruse sscanner

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks