pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

No Symbols Found in document.py

Open dbabits opened this issue 1 year ago • 1 comments

Environment data

1.87 (February 2024) NO extensions

  • Language Server version: XXX
  • OS and version: RHEL 8
  • Python version: N/A, using VSCode as editor, but available version: miniconda.4.9.2/bin/python => Python 3.9.1

Repro Steps

I use VSCode as editor on RHEL8, using X to project UI. The command to start: VSCode-linux-x64.1.87/bin/code No plugins My host does NOT have access to internet

Expected behavior

Outline (functions) should show under .py filename

Actual behavior

Outline always says "no symbols"

Logs

no logs

dbabits avatar Apr 11 '24 13:04 dbabits

NO extensions

So you don't have Pylance installed? VS Code's built-in support for Python is minimal. To have the outline populated you'll need a language server such as Pylance or Jedi. Installing the Python extension is the easiest way to get both.

Am I misunderstanding?

If the core problem is that you can't install extensions because you don't have internet access on this machine, would it be possible to download the extensions elsewhere and then bring them to this isolated machine using a USB drive, etc? If so, you could do something like this:

  1. Find extensions that you want on https://marketplace.visualstudio.com/vscode.
  2. For each extension, click on it in the search results and then click the "Download Extension" link in the right-hand column. This will download the extension's VSIX.
  3. After downloading, get the VSIX to the target machine somehow (ex. USB drive).
  4. In VS Code, bring up the command palette, execute the "Extensions: Install from VSIX..." command, and pick the VSIX you want to install.

When you install the Python extension from the marketplace via the Internet, it automatically installs the Pylance extension (and vice versa). But if you're installing by VSIX, you will need to install the Python VSIX and then install the Pylance VSIX (i.e. Pylance isn't bundled into the Python extension's VSIX).

debonte avatar Apr 11 '24 16:04 debonte

This issue has been closed automatically because it needs more information and has not had recent activity. If the issue still persists, please reopen with the information requested. Thanks.

github-actions[bot] avatar May 12 '24 11:05 github-actions[bot]