Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

[python] Recent versions of ms.python have dependency to ms-toolsai.jupyter, that's not available on open-vsx.org #441

Open
ande8331 opened this issue Nov 17, 2020 · 6 comments

Comments

@ande8331
Copy link

ande8331 commented Nov 17, 2020

Hi, I'm unable to use the debugger within the Python Docker Container. The script runs file when invoked from the shell, but quickly exits with no error messages or exceptions when run through the debugger, just an error message in the Debug console that seems unrelated to the script being debugged. Any ideas on how to work around this?

Steps to Reproduce:

  1. $ docker pull theiaide/theia-python:latest
    latest: Pulling from theiaide/theia-python
    ...
    Digest: sha256:e76ca104c62be20fa54746a109a88430f034a86691c1e8dc5f711a5eda241198
    Status: Downloaded newer image for theiaide/theia-python:latest
    docker.io/theiaide/theia-python:latest
  2. $ docker run -it --init --rm -p 3000:3000 -v "$(pwd):/home/project" theiaide/theia-python:latest
  3. Create a helloWorld.py file, first line: print("Hello World")
  4. Set breakpoint at first line in created file.
  5. Click Green Run for debugger (may need to create a "Python: Current File" debug profile here)
  6. A thread flashes by in the debug window.

Result:
Break point is not stopped at, find the error message below in the Debug Console.

Error Message: (Found in Debug Console)

Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
Error
Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
    at /home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:16:27311
    at Array.forEach ()
    at e (/home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:16:26875)
    at Object.t.plan (/home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:16:27386)
    at /home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:16:24044
    at e._get (/home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:16:23953)
    at e.get (/home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:16:22664)
    at s.get (/home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:68:141080)
    at new _ (/home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:1:269045)
    at /home/theia/plugins/vscode-python/extension/out/client/debugger/debugAdapter/main.js:1:272287
@vince-fugnitto
Copy link
Member

@ande8331 the issue seems related to a similar problem (coder/code-server#1821) experienced by the ms-python extension. If you'd like to troubleshoot, and/or provide a fix you can attempt to update the python extension to a newer version and confirm that the issue is resolved:

"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix"

"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix"

@ande8331
Copy link
Author

Thanks for the quick response @vince-fugnitto. I tried out a couple of ms-python versions:

Looking into why the newest didn't work, it appears that ms-toolsai.jupyter is now a required dependency for ms-python; but its not available in openvsx, nor can I find a path that results in downloading a file with the vsix extension.

Any way around this?

@marcdumais-work
Copy link
Member

Hi @ande8331 ,

You're right - ms-toolsai.jupyter I think was split from the Python extension recently, and is now a dependency. Momentarily it's not on open-vsx, but even if it were, I do not think we currently support the vscode extensions' API to run this bleeding-edge version.

You could try an older version, like this one: https://open-vsx.org/api/ms-python/python/2019.11.1/file/ms-python.python-2019.11.1.vsix, or if you download it from the Marketplace, the exact older version reported to work with code-server: 2020.5.86806

@stale
Copy link

stale bot commented Feb 2, 2021

This contribution has been automatically marked as stale due to inactivity, and it will be closed if no further activity occurs. Thank you for contributing to Theia!

@stale stale bot added the stale label Feb 2, 2021
@stale stale bot removed the stale label Feb 3, 2021
@marcdumais-work marcdumais-work changed the title Unable to Launch Debugger in Python Docker Container [python] Recent versions of ms.python have dependency to ms-toolsai.jupyter, that's not available on open-vsx Feb 3, 2021
@marcdumais-work
Copy link
Member

One way forward would be to have the dependent extension, ms-toolsai.jupyter, available on open-vsx.org.
The extension's source code (1) is licensed under MIT, but the extension itself is under a proprietary Microsoft license (2).

This may mean that the extension, even when built from MIT sources, contains proprietary content, for which (2) applies, preventing any non-Visual-Studio product from legally using that extension(3). For example, such content could be fetched when the extension is first activated.

1 - https://github.com/microsoft/vscode-jupyter
2 - https://github.com/microsoft/vscode-jupyter/blob/main/extension_license.txt
3 - see section 1a from (2): "You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products and services"

If the above is correct, the extension will most likely not be acceptable, to be hosted on open-vsx.org :(

@marcdumais-work marcdumais-work changed the title [python] Recent versions of ms.python have dependency to ms-toolsai.jupyter, that's not available on open-vsx [python] Recent versions of ms.python have dependency to ms-tools.jupyter, that's not available on open-vsx.org Feb 3, 2021
@marcdumais-work marcdumais-work changed the title [python] Recent versions of ms.python have dependency to ms-tools.jupyter, that's not available on open-vsx.org [python] Recent versions of ms.python have dependency to ms-toolsai.jupyter, that's not available on open-vsx.org Feb 3, 2021
@rhildred
Copy link

rhildred commented May 8, 2021

@ande8331 your fix worked for me. I used https://github.com/microsoft/vscode-python/releases/download/2020.10.332292344/ms-python-release.vsix and am back debugging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants