python.languageServer setting: jediRight-Click on a Class name and "Go To Definition" should jump to the definition of the class.
If the class is defined in the same file, it worgs.
But if the class if defined somewhere else, the GUI tells me "No definitions found for 'YourClass'.
Also I can observe error messages / deprecation warnings in the output window.
Error 2020-08-07 12:48:42: stderr jediProxy Error (stderr) /home/me/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/completion.py:589: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
all_scopes=True,
Error 2020-08-07 12:49:37: stderr jediProxy Error (stderr) /home/me/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/completion.py:600: DeprecationWarning: Providing the line is now done in the functions themselves like `Script(...).complete(line, column)`
sys_path=sys.path,
Error 2020-08-07 12:49:37: stderr jediProxy Error (stderr) /home/me/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/completion.py:600: DeprecationWarning: Providing the column is now done in the functions themselves like `Script(...).complete(line, column)`
sys_path=sys.path,
/home/me/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/completion.py:600: DeprecationWarning: Deprecated since version 0.17.0. Use the project API instead, which means Script(project=Project(dir, sys_path=sys_path)) instead.
sys_path=sys.path,
Error 2020-08-07 12:49:37: stderr jediProxy Error (stderr) /home/me/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/completion.py:628: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).infer instead.
script.goto_definitions(), request["id"]
Error 2020-08-07 12:49:47: stderr jediProxy Error (stderr) /home/me/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/completion.py:605: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).goto instead.
script.goto_assignments(follow_imports=True), request["id"]
@DanielBiskup, thanks for letting us know about this. Do you have some code we can look at? In particular, what how are you importing YourClass into the file where you get the error?
I can't share code, but it probably looks something like this:
YourClass is defined in a different module but in the same package.
So YourClass might be defined in somepackage.aaa.yourclass and in somepackage.bbb.usingithere I import YourClass with from somepackage.aaa.yourclass import YourClass.
The somepackage is also installed to the environment with pip install --editable.
When I run the my program it runs as expected without errors.
Please let me know if this elaboration helped.
Edit: Found issue. It seems (unsure why) VSCode bugs out when no there is no Python interpreter selected. I personally use pyenv, and have Python 3.8.0 as my global default. Doing Select Interpreter in VSCode and choosing my PyEnv 3.8.0 installation fixes the issue.
Errors below are still thrown -- but VSCode now navigates to the correct definitions.
Simply doing:
import jwt
And then trying to CMD click jwt throws error:
Error 2020-08-22 00:10:17: stderr jediProxy Error (stderr) /Users/felipefaria/.vscode/extensions/ms-python.python-2020.8.103604/pythonFiles/completion.py:586: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
jedi.api.names(
Error 2020-08-22 00:10:18: stderr jediProxy Error (stderr) /Users/felipefaria/.vscode/extensions/ms-python.python-2020.8.103604/pythonFiles/completion.py:594: DeprecationWarning: Providing the line is now done in the functions themselves like `Script(...).complete(line, column)`
script = jedi.Script(
Error 2020-08-22 00:10:18: stderr jediProxy Error (stderr) /Users/felipefaria/.vscode/extensions/ms-python.python-2020.8.103604/pythonFiles/completion.py:594: DeprecationWarning: Providing the column is now done in the functions themselves like `Script(...).complete(line, column)`
script = jedi.Script(
/Users/felipefaria/.vscode/extensions/ms-python.python-2020.8.103604/pythonFiles/completion.py:594: DeprecationWarning: Deprecated since version 0.17.0. Use the project API instead, which means Script(project=Project(dir, sys_path=sys_path)) instead.
script = jedi.Script(
Error 2020-08-22 00:10:18: stderr jediProxy Error (stderr) /Users/felipefaria/.vscode/extensions/ms-python.python-2020.8.103604/pythonFiles/completion.py:605: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).goto instead.
script.goto_assignments(follow_imports=True), request["id"]
Error 2020-08-22 00:10:18: stderr jediProxy Error (stderr) /Users/felipefaria/.vscode/extensions/ms-python.python-2020.8.103604/pythonFiles/completion.py:628: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).infer instead.
script.goto_definitions(), request["id"]
This only seems to happen to Python packages installed via pip. Vanilla modules work fine:
import textwrap
To replicate issue (on Mac OS):
pyenv into system.pyenv install 3.8.0 and pyenv global 3.8.0pip install requestsimport requestsI understand pyenv is an edge case, but perhaps it's worth running a simple check on vscode-python initialization via bash python --version to set default interpreter on load. I assume @DanielBiskup's case is similar to this. Conda environment is recognized globally in the system, but VS Code does not automatically change interpreter settings and is unable to use Jedi. Deprecation errors will still occur regardless if before or after fix.
Same issue here:
Right click -> Go to definition -> Nothing happens
Error 2020-09-28 13:59:19: stderr jediProxy Error (stderr) c:\Users\...\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\completion.py:603: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).goto instead.
script.goto_assignments(follow_imports=True), request["id"]
In my case the error has something to do with Git. By deleting the hidden .git folder from the project I can get it working again.
Exact same issue with pyenv and python 3.9.0
Error 2020-11-03 21:12:21: stderr jediProxy Error (stderr) /home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:584: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
jedi.api.names(
Error 2020-11-03 21:12:22: stderr jediProxy Error (stderr) /home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:584: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
jedi.api.names(
Error 2020-11-03 21:12:24: stderr jediProxy Error (stderr) /home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:592: DeprecationWarning: Providing the line is now done in the functions themselves like `Script(...).complete(line, column)`
script = jedi.Script(
/home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:592: DeprecationWarning: Providing the column is now done in the functions themselves like `Script(...).complete(line, column)`
script = jedi.Script(
Error 2020-11-03 21:12:24: stderr jediProxy Error (stderr) /home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:592: DeprecationWarning: Deprecated since version 0.17.0. Use the project API instead, which means Script(project=Project(dir, sys_path=sys_path)) instead.
script = jedi.Script(
/home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:603: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).goto instead.
script.goto_assignments(follow_imports=True), request["id"]
Error 2020-11-03 21:12:24: stderr jediProxy Error (stderr) /home/user/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/completion.py:626: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).infer instead.
script.goto_definitions(), request["id"]