"Couldn't connect to console process"

Answered
I'm working with a remote 2.7 interpreter. Browsing remote files works fine. When I try to run the console, it says "Couldn't connect to console process. Process finished with exit code -1"

What does this mean and how do I fix it?
0
12 comments
Avatar
Permanently deleted user

maybe your port is not open for the python console

0
Avatar
Permanently deleted user

I'm having this exact issue. I can do remote debugging and launching of Python processes, sync files, and do the SSH console. Whenever I try the Python Console though, I get "Couldn't connect to console process." I feel like a total noob here, is there something I must launch on the remote server? I don't have (nor can install Vagrant or Docker).

0

Hi Vance! This is known problem, unfortunately it's not clear how to reproduce it reliably: PY-18029. If you're using AWS the problem may be with security group settings, e.g.: https://youtrack.jetbrains.com/issue/PY-18029#comment=27-2322348

0
Avatar
Permanently deleted user

Thank-you very much, it is for an AWS server. I'll ask about security on the instance.

0

I've got the same error. I'm using one UDOO X86 running ubuntu as a development platform with a remote interpreter to another UDOO X86.  I can ssh to it, but the conole gives the following error:

Couldn't connect to console process.
Process finished with exit code -1

I'd appreciate some help on this one.

 

Thanks

 

Matt

 

 

0

Hello Matt,

I see your request on YouTrack: https://youtrack.jetbrains.com/issue/PY-28658. Please follow it and answer questions from developers. Thanks!

 

0
Avatar
Permanently deleted user

Hi, I have a similar problem. I opened my Pycharm and the console had a message:

C:\Users\My_Username\PycharmProjects\untitled\venv\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\pydev\pydevconsole.py" 50948 50949
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\pydev\pydevconsole.py", line 4, in <module>
from _pydev_imps._pydev_saved_modules import thread
File "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\pydev\_pydev_imps\_pydev_saved_modules.py", line 4, in <module>
import threading
ModuleNotFoundError: No module named 'threading'
Process finished with exit code 1
Couldn't connect to console process.

0

Hi Tmahlelebe16! It's a different problem I believe, the original one is related to remote interpreters. Your error sounds similar to PY-26601, do you receive it with any project? Please feel free to create a new ticket in our bug tracker: https://youtrack.jetbrains.com/issues/PY

0
Avatar
Permanently deleted user

Thanks, Pavel, I will go to the link you've suggested.

0
Avatar
Permanently deleted user

Pseudo-workaround: the console in the pycharm debugger works. I made an empty .py-file with just a print() statement, put a breakpoint on that line, and debug that file. Then click the button "Show Python Prompt" in the Console-tab in the debug tool window.

(I am also using a remote AWS server.)

0
Avatar
Permanently deleted user

Might be helpful to others.

Recently I got the same issue. Finally I figured it out that because I upgraded my python from 3.6 to 3.7. And the project environment failed to find the console from old python3.6 folder. 

If this is your issue, probably you cannot open python from the terminal in Pycharm neither. It is pretty easy to solve. Reselect the project interpreter as python3.7. 

0
Avatar
Permanently deleted user

Goto File --> Settings --> select the Project --> Project Interpreter --> [ HERE SELECT THE PATH,,, ie, Python is installed,, ex: e:\python\python37-32\python.exe

Set this for ALL projects,,,it works fine

0

Please sign in to leave a comment.