Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

"No Symbol information for the file" even when inside the file #1893

Open
aderchox opened this issue Feb 3, 2020 · 1 comment
Open

"No Symbol information for the file" even when inside the file #1893

aderchox opened this issue Feb 3, 2020 · 1 comment

Comments

@aderchox
Copy link

aderchox commented Feb 3, 2020

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar): 2020.1.58038
  • OS and version: Windows_NT x64 10.018363
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.0b3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: python-pptx v0.6.18
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version vscode-python#3977): false

Expected behaviour

I installed python-pptx and then opened the Presentation.__file__ in it and then chose Go-to Symbol in File, I expect it to list the symbols in that file.

Actual behaviour

But it says: "No symbol information for the file". I've also waited there thinking it might be still loading things but it's permanent and is not showing the symbols. Then I thought it might be because of the kind of deep installation path of my Python (in the local in the appdata, is that deep?) and so copied the file to the root of a drive and now when I reopen it, the option works instantly. Could someone tell me whether it's really my bad Python installation path or something else? I read here that such an issue might be an extension thing so I'm posting this here.

Steps to reproduce:

  1. pip install python-pptx
  2. open the file Presentation.__file__
  3. Hit Ctrl+Shift+O or Click on Go -> Go to Symbol in File
  4. the list is empty and the message there is: "No Symbol information for the file".

Logs

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> py -3.7 -c "import sys;print(sys.executable)"
> py -3.6 -c "import sys;print(sys.executable)"
> py -3 -c "import sys;print(sys.executable)"
> py -2 -c "import sys;print(sys.executable)"
> ~\AppData\Local\Programs\Python\Python37\python.exe -c "import sys;print(sys.executable)"
> ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> C:\ProgramData\Anaconda3\Scripts\conda.exe info --json
Starting Microsoft Python language server.
> (value not set)\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> (value not set)\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> C:\ProgramData\Anaconda3\Scripts\conda.exe env list
> (value not set)\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> (value not set)\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python37\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python37\python.exe c:\Users\mojta\.vscode\extensions\ms-python.python-2020.1.58038\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python37\python.exe -m pip --version
Starting Microsoft Python language server.

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
(I open the console but I really have no idea where to run Enable source map support for extension debugging, it doesn't sound like JavaScript to be entered in the console :/ )

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Feb 4, 2020
@MikhailArkhipov
Copy link

Somewhat similar to #178. __file__ is not a static property, it is a dynamically added object. LS is a static analyzer and does not run any Python code hence dynamically added members won't show up.

Presentation is just a function that returns dynamically constructed object.

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

No branches or pull requests

2 participants