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)

2
14 comments

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?

1
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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.

 

4
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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 @...'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

@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
Avatar
Permanently deleted user

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

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
Avatar
Permanently deleted user

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

0

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

I had the same problem. I had a file called "numbers.py". I deleted it and everything went back to normal.

0

Hello,

I had the same problem which started happening out of nowhere. Following Aagueorguiev's advice I did find myself having a file named "numbers.py" and after renaming it everything is working. On a side note as mentioned above this can happen with all sorts of file names like "string, class, function" etc. so you may want to be careful with that too.

Good luck!

0

Hello,

I had similar problem with the debugger which started out of the blue. Then I realized I created a new python file called "numbers.py". Renaming it to "--numbers.py" resulted in working debugger.

So, check for newly created files with very common names.

Hope this helps.

0

Please sign in to leave a comment.