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 object command (Ctrl+O or 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.blueprints in an open .py file
- Bring cursor over the
blueprints word and press F12
- 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 👏
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 undefinedExpected 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:
Go To Python objectcommand (Ctrl+Oor from command palette)flask.blueprints)Keep in mind that "manually" emulating the behavior of the command works, thus the resolution of the Python path is not the issue here:
import flask.blueprintsin an open.pyfileblueprintsword and pressF12/some/venv/path/lib/python2.7/site-packages/flask/blueprints.py)Logs
Output from
Console window(Help->Developer Tools menu)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 👏