Pydev console is already there

I get the following error code when trying to start python interactive console in pydev

I canโ€™t understand whatโ€™s wrong. When i talk about

The console has already exited with a value of: 1

part of the error, nothing useful appears.

What is strange is that this only happens in one of my python workspace projects. Only. And everything else is the same as in others.

I want to add a picture of the question, but it requires me more than 10 reputations .......

Console initialization failed. Unexpected console connection error. Failed to get proper Hello response from pydevconsole. Recent Messages Received: The console has already exited with a value of: 1, waiting for a Reply.

+6
source share
2 answers

pip uninstall traitlets just worked for me.

+5
source

It seems (on my YMMV system) to be a confirmed error where pydev is not updating to match the API change from ipython version 4 to version 5.

Or do

 pip uninstall ipython pip install ipython==4.2.0 

(a hint of this answer ) OR apply the following patch to pydev_ipython_console_011.py .

 163c163 < self.has_readline) --- > ) 171d170 < use_readline=self.has_readline, 183d181 < use_readline=self.has_readline, 194d191 < use_readline=self.has_readline, 239,245d235 < < # Only configure readline if we truly are using readline. IPython can < # do tab-completion over the network, in GUIs, etc, where readline < # itself may be absent < if self.has_readline: < self.set_readline_completer() < 

Removing the tracking allowed me to open the pydev console in eclipse, but broke ipython on the command line, so I reinstalled it. However, since the error message mentions that some process is dying with exit code 1, I decided that suppressed tracing might be observed. So, I ran the specified command line

 /usr/bin/python2.7 -u /home/tsbertalan/eclipse/cpp-mars/eclipse/../../../.p2/pool/plugins/org.python.pydev_4.5.4.201601292234/pysrc/pydevconsole.py 34462 35898 34462 35898 

(which obviously depends on my particular installation) and got a trace ending in

 File "/home/tsbertalan/.p2/pool/plugins/org.python.pydev_4.5.4.201601292234/pysrc/_pydev_bundle/pydev_ipython_console_011.py", line 194, in _new_completer_200 use_readline=self.has_readline, AttributeError: 'PyDevTerminalInteractiveShell' object has no attribute 'has_readline' 

When I looked at the last line, I got this answer where it is related to the changed API in ipython v5. So this is a bug in pydev. Then I checked their problem tracking and found that it was already processed and a workaround was to remove the offensive old API details (see Patch above).

Unfortunately, the patch method only works for pydev 4.5.4. When I updated using the Eclipse function "Check for Updates" (in the hope that 5.1.3 will be available - only 5.1.2 was), the fix solved an immediate failure in that the interactive console was launched using ipython, but using object? for printing, docstrings instead printed some kind of dictionary-like object. So now I am using pydev 5.1.2 with ipython 4.2.0. Maybe when I get 5.1.3, I will try to update ipython.

+1
source

Source: https://habr.com/ru/post/983901/


All Articles