Skip to content

vscode python extension not running in ubuntu 16.04 LTS. #10793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fieraloca opened this issue Mar 25, 2020 · 11 comments
Closed

vscode python extension not running in ubuntu 16.04 LTS. #10793

fieraloca opened this issue Mar 25, 2020 · 11 comments
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@fieraloca
Copy link

Issue Type: Bug

Extension version: 2020.3.69010
VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:52:11.516Z)
OS version: Linux x64 4.15.0-91-generic

VSCode Version:

Version: 1.43.2
Commit: 0ba0ca5
Date: 2020-03-24T07:52:11.516Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-88-generic

OS Version: Ubuntu 16.04 LTS

Steps to Reproduce:

  1. Create and open a python file (testing.py; add a single line to it)
print('... testing'). 

2.Configure launch.json to use python.
3. Select Python: Interpreter.
I have tried with conda environments; and python 3.5; 3.6; 3.6 with same error result.
4. Run the debugger (F5).

Does this issue occur when all extensions are disabled?: Yes
Only python extension is enabled. Version : 2020.3.69010 (19 March 2020)

Error list

Error Window Popup

Session[1] timed out waiting for <debugpy.adapter.components.missing.<locals>.Missing object at 0x7fb9e2753cc0> to connect

Console output

(TESTSUITE) rpglover@u832f94cf022e52:~/Desktop/deleteme$  env DEBUGPY_LAUNCHER_PORT=40883 /anaconda3/envs/TESTSUITE/bin/python /rpglover/.vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/debugpy/no_wheels/debugpy/launcher /rpglover/Desktop/deleteme/testing.py 
Traceback (most recent call last):
  File "/anaconda3/envs/TESTSUITE/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/anaconda3/envs/TESTSUITE/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/rpglover/.vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/debugpy/no_wheels/debugpy/launcher/__main__.py", line 80, in <module>
    main()
  File "/rpglover/.vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/debugpy/no_wheels/debugpy/launcher/__main__.py", line 42, in main
    launcher.connect(launcher_port)
  File "/rpglover/.vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/debugpy/no_wheels/debugpy/launcher/../../debugpy/launcher/__init__.py", line 27, in connect
    sock.connect(("127.0.0.1", launcher_port))
ConnectionRefusedError: [Errno 111] Connection refused
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Mar 25, 2020
@tysonpaul89
Copy link

I am also facing the same issue. I am also in Ubuntu 16.04 LTS.

I tried to downgrade the python extension to previous versions, but then the debugger will not start(no error shown on this case just. Terminal will show the initial debug command and it will not get executed).

I suspect this an OS related issue because on my laptop which is using Ubuntu 18.04 LTS doesn't have this issue.

This my launch.json.

{
   "version":"0.2.0",
   "configurations":[
      {
         "name":"Python: Current File",
         "type":"python",
         "request":"launch",
         "program":"${file}",
         "console":"integratedTerminal",
         "pythonPath":"/Projects/xxx/xxx/env/bin/python"
      },
      {
         "name":"Python: Django 8000",
         "type":"python",
         "request":"launch",
         "program":"${workspaceFolder}/manage.py",
         "console":"integratedTerminal",
         "pythonPath":"/Projects/xxx/xxx/env/bin/python",
         "args":[
            "runserver",
            "--noreload",
            "--nothreading"
         ],
         "django":true
      },
      {
         "name":"Python: Django 8001",
         "type":"python",
         "request":"launch",
         "program":"${workspaceFolder}/manage.py",
         "console":"integratedTerminal",
         "args":[
            "runserver",
            "8001",
            "--noreload",
            "--nothreading"
         ],
         "django":true
      },
      {
         "name":"Python Celery",
         "type":"python",
         "request":"launch",
         "program":"${workspaceFolder}/manage.py",
         "console":"integratedTerminal",
         "args":[
            "celeryd",
            "-Q",
            "cronJobQueueLow_LOCAL",
            "-l",
            "info",
            "-P",
            "solo"
         ],
         "django":true
      }
   ]
}

VSCode Version:

Version: 1.43.1
Commit: fe22a9645b44368865c0ba92e2fb881ff1afce94
Date: 2020-03-18T07:17:38.324Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.4.0-176-generic

Python Extension Version

Id: ms-python.python
Version: 2020.3.69010

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 26, 2020
@karthiknadig karthiknadig added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug area-debugging and removed triage-needed Needs assignment to the proper sub-team labels Mar 26, 2020
@woodenshoe-isk
Copy link

I'm getting the same error on MacOS Catalina
OS: Catalina 10.15.4 (19E266)
VS Code: Version: 1.43.2 Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
MS Python Extension: 2020.3.69010

@omartin2010
Copy link

omartin2010 commented Mar 27, 2020

I have the same error connecting from both Windows and MacOs, but using the remote extension to connect to a ubuntu 16.04 machine. And I just tested with the previous version of the python extension and for me, it works normally.

@int19h
Copy link

int19h commented Mar 27, 2020

@fieraloca You've mentioned that you're hitting this issue with conda as well as system Python. For the latter, are you also creating virtual environments? Does it still happen if using the system interpreter directly?

@omartin2010
Copy link

omartin2010 commented Mar 27, 2020 via email

@fieraloca
Copy link
Author

@int19h I have tried with both system python (with and without virtualenv) and with conda environments for python 3.5; 3.6 and 3.7. Same failure in all cases...

@Shannon33
Copy link

I'm getting the same error on MacOS Catalina when I using the remote extension to connect to a ubuntu 16.04 machine.I can't debug,I got the error message "timed out waiting for <debugpy.adapter.components.missing..Missing object at 0x7fb9e2753cc0> to connect"

@omartin2010
Copy link

omartin2010 commented Mar 29, 2020 via email

@Shannon33
Copy link

@omartin2010 thank you very much! I choose to go back to previous version,it work! Just change the extension of python (ms-python.python),the mistake will solve.

@fieraloca
Copy link
Author

Here is what took me to fix the problem in Ubuntu 16.04

reference sites: https://stackoverflow.com/questions/37071388/how-can-i-install-visual-studio-code-extensions-offline

Step 1. Get a previous version of vscode

  • uninstall all and every version of vscode from you PC. (don't ask why; just do it !)

  • launch browser with https://code.visualstudio.com/updates/v1_42

  • click the [deb] link under Linux
    Downloads: Windows: User System | Mac | Linux: snap deb rpm tarball

  • save the file to your Downloads folder. it should be named "code_1.42.1-1581432938_amd64.deb"

  • navigate to Downloads; right-click the ".deb" file and select "Open with software installer"

    this will install vscode

  • launch vscode and update your settings to disable auto update ( Do not select None; if does not work in ubuntu; use manual instead)

    File/Preferences/Settings/Application/Update
    Mode : Manual

Step 2. Get ms-python.python extension

  • download ms-python extension manually using the following link

https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-python/extension/python/2019.10.0/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

I played with few versions until I got one to work; be may guess and try to match the best one for your needs; I selected 2019.10.0 because this is the day the mantis ate the cricket...

  • the file is downloaded as Microsoft.VisualStudio.Services.VSIXPackage

  • add a file extension to the file (right-click/rename) to be Microsoft.VisualStudio.Services.VSIXPackage.vsix

  • launch vscode. Please ignore any attempts to update; if you do, you will be back to square one.

  • select the Extensions tab (Ctrl-Shift-X)

  • click the "..." (More Actions... ) at the top of the tab, to the right of "EXTENSIONS"; Select "Install from VSIX"

  • select your VSIX package from Downloads (before you click Install, clap 3 times with the back of your hands... proven to work every time!!! )

  • your extension will be installed. ( I have selected 2019.5.18875).

  • DO NOT CLICK THE "Update to 2020.3..." beside your Python package.

  • Happy coding.

@int19h
Copy link

int19h commented Apr 1, 2020

microsoft/debugpy#84 is the primary issue tracking this bug now, so I'll close this one as a dupe.

@int19h int19h closed this as completed Apr 1, 2020
@ghost ghost removed the triage label Apr 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

7 participants