No Symbols Found in document.py
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
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:
- Find extensions that you want on https://marketplace.visualstudio.com/vscode.
- 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.
- After downloading, get the VSIX to the target machine somehow (ex. USB drive).
- 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).
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.