Repository navigation
"Go To Python object" doesn't work since v0.8.0 #403
Description
Environment data
VS Code version: 1.18.1
Python Extension version: 0.8.0
OS and version: Ubuntu 16.04 64-bit
Actual behavior
Warning notification shows up: TypeError: Cannot read property 'toString' of undefined
Expected behavior
Opening the definition source file of the Python path entered.
(Another valuable "feature" on top of this would be to have some sort of "auto-completion" over the installed Python packages when typing inside the opened input prompt, which would make exploration of packages much easier. I would be happy to move this as a feature request in a separate issue)
Steps to reproduce:
- Run the
Go To Python objectcommand (Ctrl+Oor from command palette) - Type a Python path of a package installed in the current Python environment (eg.
flask.blueprints) - Warning notification appears as described above
Keep in mind that "manually" emulating the behavior of the command works, thus the resolution of the Python path is not the issue here:
- Type
import flask.blueprintsin an open.pyfile - Bring cursor over the
blueprintsword and pressF12 - Source definition file opens (
/some/venv/path/lib/python2.7/site-packages/flask/blueprints.py)
Logs
Output from Console window (Help->Developer Tools menu)
shell.ts:459 [ms-python.python] Cannot read property 'toString' of undefined: TypeError: Cannot read property 'toString' of undefined
at t.getWorkspaceFolder (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:507008)
at e.getWorkspaceFolder (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:507578)
at Object.getWorkspaceFolder (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:493761)
at JediFactory.getJediProxyHandler (/home/alex/.vscode/extensions/ms-python.python-0.8.0/out/client/languageServices/jediProxyFactory.js:16:52)
at PythonDefinitionProvider.provideDefinition (/home/alex/.vscode/extensions/ms-python.python-0.8.0/out/client/providers/definitionProvider.js:47:33)
at PythonDefinitionProvider.descriptor.value (/home/alex/.vscode/extensions/ms-python.python-0.8.0/out/client/telemetry/index.js:34:43)
at PythonObjectDefinitionProvider.<anonymous> (/home/alex/.vscode/extensions/ms-python.python-0.8.0/out/client/providers/objectDefinitionProvider.js:60:48)
at Generator.next (<anonymous>)
at fulfilled (/home/alex/.vscode/extensions/ms-python.python-0.8.0/out/client/providers/objectDefinitionProvider.js:10:58)
at <anonymous>
PS: Thank you for all the great work on making VS Code the most pleasant editor I've ever used for developing Python. Best of wishes for the extension's (and your) new home at Microsoft 👏
Activity
ericsnowcurrently commentedon Jan 18, 2018
Hi Alex Ioannidis (@slint)! Thanks for reporting this issue. I was able to verify it's still a problem (at least on linux). We'll look into it as soon as we can.
As to your auto-completion feature request, go ahead and file a separate issue for that. Thanks!
MikhailArkhipov commentedon Feb 20, 2018
Should be fixed for 2018.2 now