PyDev Jython Interactive Console on Eclipse fails

2019-02-17 05:48发布

问题:

Why might my Jython Interactive Console fail to be created when called in Eclipse?

Following the 'Using Jython in an IDE' instructions in the Jython manual (http://www.jython.org/jythonbook/en/1.0/JythonIDE.html) I have reached just before 'Listing 11-10' in the Testing section, specifically:

First, click the right-most button on the console’s toolbar (you will recognize it as the one with a plus sign on its upper left-hand corner, which has the Open Console tip when you pass the mouse over it). From the menu, select PyDev Console. To the next dialog, answer Jython Console. After doing this you will get an interactive interpreter embedded on the IDE

I select 'Open Console' -> 'PyDev Console' -> 'Jython Console' -> 'OK'. The 'Create Interactive Console' dialog appears and then either:

  1. Gets about 1/10th complete and stops (I left it overnight and it hadn't progressed in the morning)
  2. Finishes and fails with the error message:

Error initializing console. Unexpected error connecting to console. Failed to recive suitable Hello response from pydevconsole. Last msg received: HTTP server returned unexpected status: null

My setup:

  • Operating System: Windows XP
  • Eclipse: Kepler Service Release 1
  • Jython: 2.5.2
  • PyDev: 3.0.0.201311051910

回答1:

This error occured due to badly configured proxy settings, specifically the proxy exceptions did not include 'localhost' and '127.0.0.1'. This resulted in requests from Eclipse to itself through localhost being diverted through the proxy, which neither the proxy nor Eclipse were happy with.

The solution (in Windows XP) was to open Internet Options -> Connections (tab) -> LAN Settings -> Advanced, and then add localhost;127.0.0.1; to the beginning of the Exceptions list.



回答2:

I think this was an issue on PyDev. Can you please check the latest nightly build (see http://pydev.org/download.html for details on how to get it) and see if it works for you?