Skip to content

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

Closed

Description

@fieraloca

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

Activity

  1. ghost added
    triage-needed
    on Mar 25, 2020
  2. tysonpaul89 commented on Mar 26, 2020

    @tysonpaul89

    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

  3. ghost removed
    triage-needed
    on Mar 26, 2020
  4. added
    triage-needed
    bug
    and removed
    triage-needed
    on Mar 26, 2020
  5. woodenshoe-isk commented on Mar 26, 2020

    @woodenshoe-isk

    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

  6. omartin2010 commented on Mar 27, 2020

    @omartin2010

    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.

  7. int19h commented on Mar 27, 2020

    @int19h

    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?

  8. omartin2010 commented on Mar 27, 2020

    @omartin2010
  9. fieraloca commented on Mar 28, 2020

    @fieraloca
    Author

    Pavel Minaev (@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...

  10. Shannon33 commented on Mar 29, 2020

    @Shannon33

    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"

  11. omartin2010 commented on Mar 29, 2020

    @omartin2010
  12. Shannon33 commented on Mar 29, 2020

    @Shannon33

    Olivier Martin (@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.

  13. fieraloca commented on Mar 31, 2020

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

  14. int19h commented on Apr 1, 2020

    @int19h

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

  15. ghost removed on Apr 1, 2020
  16. locked as resolved and limited conversation to collaborators on Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-debuggingbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions