vscodium: Python autocompletion doesn't work with VS Code Python extenstion (Pylance)

Describe the bug When I am using VS Codium and have the VS Code Python and Pylance extensions installed and enabled, I don’t get any autocomplete options or suggestions and it shows No suggestions.

Screenshot from 2021-10-28 18-56-31

As you can see I have enabled only the Python extension and it shows No suggestions. Now when I disable I get some suggestions but they are not Python suggestions, but rather just suggesting text from other parts of the file.

Screenshot from 2021-10-28 18-56-53

But not even this works when the extension is turned on.

Please confirm that this problem is VSCodium-specific

  • This bug doesn’t happen if I use Microsoft’s Visual Studio Code. It only happens in VSCodium.

Please confirm that the issue/resolution isn’t already documented

Desktop (please complete the following information):

  • OS: Ubuntu 20.04 LTS
  • Architecture x64
  • Version 1.61.2

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 21 (3 by maintainers)

Commits related to this issue

Most upvoted comments

The issue is that Microsoft prevents PyLance from being used in non-official builds. A workaround is to modify the product.json file, and set nameLong to "Visual Studio Code".

Source: https://www.reddit.com/r/linux/comments/k0s8qw/comment/ggnqes7/

Thank you, it worked for me too. +1

I’ve already tried this solution but it never worked for me. BUT it seems that the combination of 2 different changes in the product.json file makes the things working again!

{  
  "nameShort": "Visual Studio Code",
  "nameLong": "Visual Studio Code",
  ...
  ...
  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

The python extension is tricky since it’s using a closed source server (pylance). I do believe that the best course of action would for some python devs to fork that extension and replace the closed source part with a new open source project.

The issue is that Microsoft prevents PyLance from being used in non-official builds. A workaround is to modify the product.json file, and set nameLong to "Visual Studio Code".

Source: https://www.reddit.com/r/linux/comments/k0s8qw/comment/ggnqes7/

Thank you, it worked for me too. 👍

Sorry for issue necromancy, but I found another potential solution today: Uninstall the Microsoft Python extension and install the Pyright extension instead. It’s still Microsoft, but it provides auto-completion and error checking, and works on VSCodium out of the box without modification.

@an4s911 confirmed here as well with version 1.61. It seems to me that the last working release is the 1.56

The issue is that Microsoft prevents PyLance from being used in non-official builds. A workaround is to modify the product.json file, and set nameLong to "Visual Studio Code".

Source: https://www.reddit.com/r/linux/comments/k0s8qw/comment/ggnqes7/

Thanks. Just like some others have mentioned, this worked for me as well. I think I will close the issue now as the issue is solved for me as well as others.

If the above mentioned solution didn’t work then try the below and it should probably fix it.

Thank you, it worked for me too. +1

I’ve already tried this solution but it never worked for me. BUT it seems that the combination of 2 different changes in the product.json file makes the things working again!

{  
  "nameShort": "Visual Studio Code",
  "nameLong": "Visual Studio Code",
  ...
  ...
  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

And I am closing this Issue. Thanks to everyone who helped and contributed ✌

I have the same issue on Windows 10, VsCodium 1.61.2

I originally was not getting even classes and functions in the outline so I removed Pylance, which helped with the Outline but I now have no autocompletion.

This use work fine in early versions this year but I cant tell the last working version.

@ghtmtt What does it say in the Python output terminal?

Before I change nameLong:

Starting Pylance language server.
Error 2021-11-02 17:21:36: Failed to start language server, Class name = r, completed in 0ms, has a falsy return value, Arg 1: <Uri:/home/grans/Documents/harvesters_gui/Utils/CameraCalibration.py>, Arg 2: {"sysPrefix":"/usr","envType":"Global","envName":"","envPath":"","path":"/bin/python" [... etc] 

After I change, it simply prints:

Starting Pylance language server.

with no error after it.