8

When trying to open a interactive console on pydev I get an error:

Error initializing console.
Unexpected error connecting to console.
Failed to recive suitable Hello response from pydevconsole. Last msg received: HTTP server returned unexpected status: Service Unavailable
Command Line used: D:\activestate\python.exe -u D:\Boulot\pydev\eclipse\plugins\org.python.pydev_3.3.3.201401272249\pysrc\pydevconsole.py 51203 51204 51203 51204

Eclipse:
Version: Kepler Service Release 2
Build id: 20140224-0627
Pydev:
PyDev for Eclipse   3.3.3.201401272249
Java:
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Any idea how to make it work?

user2759511
  • 640
  • 7
  • 16
  • What version of Eclipse, PyDv and Java are you using? – aruisdante Mar 12 '14 at 14:56
  • Answer in the question – user2759511 Mar 12 '14 at 17:25
  • possible duplicate of [PyDev Jython Interactive Console on Eclipse fails to be created](http://stackoverflow.com/questions/20395750/pydev-jython-interactive-console-on-eclipse-fails-to-be-created) – aruisdante Mar 12 '14 at 19:19
  • I saw that, but I think it's a different problem for he gets unexpected status: null while I get unexpected status: Service Unavailable. Furthermore, the accepted dolution does not seem to apply to me , as my LAN settings are disabled and therefore I cannot click on the Advanced button he suggests. – user2759511 Mar 12 '14 at 19:24
  • It could be an overly aggressive firewall blocking it though. PvDev talks to the interactive console's kernel via sockets. In other words the thing actually doing the back-end processing is not running directly embedded in the thing that is displaying it (which is how it can switch interpreters easily) – aruisdante Mar 12 '14 at 19:26
  • I have the same problem (Win 7, Eclipse Luna (4.4.0), Python 2.6.4 and 2.7.2, Java 1.7.0_55). Turned off my firewall, didn't make a difference. – FriendFX Jul 03 '14 at 03:08
  • Never mind, [the answer](https://stackoverflow.com/a/21111262/897968) to the linked potential duplicate made it go away, even though I had been using the same setup for years without problem. Ah well, another mystery :) – FriendFX Jul 03 '14 at 04:32

3 Answers3

7

Try following:

In Eclipse under Window/Preferences/General/Network Connections:

--> set Active Provider: Manual

--> check in the box "Proxy bypass" if localhost and 127.0.0.1 are checked

Click Apply and try to open again.

That worked for me

Sala
  • 81
  • 1
  • 3
2

As documented here, the solution is to update IPython

workon project
pip install -U ipython

I was having the same problem and fixed it with this.

Community
  • 1
  • 1
0

(My solution is inspired by @Sala's answer. And I want to add more reasoning here.)

The root cause for my problem is, pydev console is hosted on localhost/127.0.0.1 and I have configured a proxy in my system. So my eclipse tried to visit it via a proxy but my proxy cannot find it since it is not a valid public address.

With @Sala's solution, one working configuration is like below. It essentially prevents eclipse from using the system (i.e. native) proxy.

enter image description here

And you should notice that in the Proxy bypass area, the Provider for localhost and 127.0.0.1 is Manual. Just in consistent with the Proxy entries area.

But what if you do want to use proxy? You need to bypass your native proxy for pydev console.

You can do it in IE -> Internet Options -> Connection -> LAN Settings -> Advanced:

enter image description here

Then, you don't nee to restart your eclipse, and you will see the Provider for the bypassed localhost and 127.0.0.1 has changed to Native now as shown below:

enter image description here

Now the pydev console should be able to start.

smwikipedia
  • 61,609
  • 92
  • 309
  • 482