Connection to Python debugger failed: Interrupted function call: accept failed

I cant get my debugger to work in any program.

This is the error i get:

Process finished with exit code -1073741819 (0xC0000005)

11 comments
Comment actions Permalink

Do you get this issue even when debugging a simple hello-world script?

What project interpreter do you use? Have you tried to recreate it?

0
Comment actions Permalink

I had the same issue. It started happening out of the blue, not sure what triggered it. I could Run anything, but not Debug the same thing.

I was on PyCharm Professional 2019.2 (with lots of updates). I ended up uninstalling everything (including settings in my user home) and then installing latest PyCharm 2019.3. Eveything working again.

I'm on Windows 10, and using Ubuntu 18.4 filesystem on WSL.

0
Comment actions Permalink

I had Python Community Edition (2019.1.1, now 2019.3.3) installed on Windows laptop. I named a new file "String". It took some time before I realized it was the name which caused the debugger to fail. The message I received was "connection to python debugger failed interrupted function call accept failed" .
The failure was caused solely by the improper naming of the file. I tested again on version 2019.3.3, the name "string" causes the same failure of the debugger to connect and connection is fine when I change the file name to something else.

 

3
Comment actions Permalink

I had PyCharm Professional Edition 2019.3.3 on Windows 10, configuring the WSL interpreter. When I started debugger, I encountered the same issue. I solved it by setting Windows Defender firewall to 'Allow an app or feature through Windows firewall', click the link, enter and get PyCharm checked.

0
Comment actions Permalink

Hello,

I am working with WSL (Ubuntu 18.04) and I cannot debug my code anymore. When I click on debug, I directly get the error mentioned above:

`Connection to Python debugger failed`
`Interrupted function call: accept failed`

In addition, the see the following message:

`can't open file '/mnt/c/Program Files/JetBrains/PyCharm 2019.2.1/helpers/pydev/pydevd.py': [Errno 2] No such file or directory`

I checked and there is indeed no `helpers` directory in `PyCharm 2019.2.1`.

I tested different files and all gave the same error. I tried to allow PyCharm through Windows firewall, but it did not change anything.

Any ideas how to handle this? Thank you!

 

 

0
Comment actions Permalink

Hi Everyone!

Sorry for taking so long to get back to all of you.

I no longer am plagued by this however when I do occasionally get it the first thing I check is the interpreter settings.

  • Is your path to python.exe correct?
  • Are you working in any Virtual Environments? If so is the interpreter pointing to the 'venv' ?
  • Have a look at Christina Ambareva's comment: you might have a class/ method with names that are reserved.

If that doesn't help maybe consider downloading anaconda. It'll give you something to work with until you find a better solution.

 

Hope this helps,

Good luck! 

 

PS. please post 

0
Comment actions Permalink

@Guillaume Rc Stern

>I checked and there is indeed no `helpers` directory in `PyCharm 2019.2.1`.

After some version the helpers directory have moved under <installation_dir>/plugins/python/helpers (I don't remember when exactly). Check if you have it. If you do, try to delete/recreate the WSL interpreter from scratch. I suggest updating PyCharm to the latest version as well: https://www.jetbrains.com/pycharm/download

Or at least to the latest from 2019 branch: https://www.jetbrains.com/pycharm/download/other.html

0
Comment actions Permalink

I also have this error.  This happened after a recent update, saying

/usr/bin/python3: can't open file '/mnt/c/Users/Benjamin/AppData/Local/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/helpers/pydev/pydevd.py': [Errno 2] No such file or directory

 

This is clearly a problem with the installation, not anything on our end.  How do we fix this?  I would like to use the wsl debugger..

0
Comment actions Permalink

Hello, 

 

According to the path ``mnt/c/Users/Benjamin/AppData/Local/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/helpers/pydev/pydevd.py'``  helpers from the previous version are used. Have you tried to re-create the WSL interpreter from  scratch? 

0
Comment actions Permalink

Yes I did re-create the wsl interpreter from scratch and made sure that it is being used.

0
Comment actions Permalink

Could you please attach a screenshots of the: 

1. Error you are getting in Debug Console

2. Run/Debug configuration of the executed script (https://www.jetbrains.com/help/pycharm/creating-and-editing-run-debug-configurations.html)

 

0

Please sign in to leave a comment.