Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Go To Python object" doesn't work since v0.8.0 #403

Closed
slint opened this issue Dec 12, 2017 · 2 comments
Closed

"Go To Python object" doesn't work since v0.8.0 #403

slint opened this issue Dec 12, 2017 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@slint
Copy link

slint commented Dec 12, 2017

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 👏

@brettcannon brettcannon added awaiting 1-verification bug Issue identified by VS Code Team member as probable bug labels Dec 12, 2017
@ericsnowcurrently ericsnowcurrently self-assigned this Jan 18, 2018
@ericsnowcurrently
Copy link
Member

Hi @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
Copy link

Should be fixed for 2018.2 now

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants