Join the Kedro community

Updated 14 hours ago

Stupid Question: The Kedro Vscode Plugin Does Not Work For Me

Stupid question, the kedro vscode plugin does not work for me. After installing this and the dependencies I still cannot click on the catalog items. Any standard solution for this?

1
J
P
R
15 comments

hi @Paul Mora, no stupid question at all. on the Output tab of VS Code, could you select Kedro on the dropdown and tell us what you see?

it should be something like this

[object Object]
2025-01-17 13:38:52.361 [info] Attempt to search `feature_engineering` from parameters file
2025-01-17 13:38:52.363 [info] [Error - 1:38:52 PM] Request textDocument/definition failed.
2025-01-17 13:38:52.363 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 13:38:52.412 [info] Attempt to search `feature_engineering` from parameters file
2025-01-17 13:38:52.413 [info] [Error - 1:38:52 PM] Request textDocument/definition failed.
2025-01-17 13:38:52.413 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 13:38:52.431 [info] Attempt to search `feature_engineering` from parameters file
2025-01-17 13:38:52.433 [info] [Error - 1:38:52 PM] Request textDocument/definition failed.
2025-01-17 13:38:52.433 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 13:38:52.633 [info] [Error - 1:38:52 PM] Request textDocument/hover failed.
2025-01-17 13:38:52.633 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'dummy_catalog'. Did you mean: '_get_dummy_catalog'?
  Code: -32603 
[object Object]
2025-01-17 13:39:17.957 [info] [Error - 1:39:17 PM] Request textDocument/hover failed.
2025-01-17 13:39:17.957 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'dummy_catalog'. Did you mean: '_get_dummy_catalog'?
  Code: -32603 
[object Object]

Would that help?

this should help. if you scroll up a bit, do you see a Python traceback somewhere?

2025-01-17 12:54:11.010 [info] Name: Kedro
2025-01-17 12:54:11.010 [info] Module: kedro
2025-01-17 12:54:11.010 [info] Python extension loading
2025-01-17 12:54:11.010 [info] Python Interpreter: 
2025-01-17 12:54:11.010 [info] Waiting for interpreter from python extension.
2025-01-17 12:54:11.010 [info] Python extension loaded
2025-01-17 12:54:11.010 [info] Server run command: /Users/Paul_Mora/.pyenv/versions/3.10.5/envs/cautious/bin/python /Users/Paul_Mora/.vscode/extensions/kedro.kedro-0.2.3/bundled/tool/lsp_server.py
2025-01-17 12:54:11.010 [info] Server: Start requested.
2025-01-17 12:54:11.101 [info] before_update_path=['/Users/Paul_Mora/.vscode/extensions/kedro.kedro-0.2.3/bundled/tool', '/Users/Paul_Mora/.pyenv/versions/3.10.5/lib/python310.zip', '/Users/Paul_Mora/.pyenv/versions/3.10.5/lib/python3.10', '/Users/Paul_Mora/.pyenv/versions/3.10.5/lib/python3.10/lib-dynload', '/Users/Paul_Mora/.pyenv/versions/3.10.5/envs/cautious/lib/python3.10/site-packages']
after_update_path=['/Users/Paul_Mora/.vscode/extensions/kedro.kedro-0.2.3/bundled/libs', '/Users/Paul_Mora/.vscode/extensions/kedro.kedro-0.2.3/bundled/tool', '/Users/Paul_Mora/.pyenv/versions/3.10.5/lib/python310.zip', '/Users/Paul_Mora/.pyenv/versions/3.10.5/lib/python3.10', '/Users/Paul_Mora/.pyenv/versions/3.10.5/lib/python3.10/lib-dynload', '/Users/Paul_Mora/.pyenv/versions/3.10.5/envs/cautious/lib/python3.10/site-packages']

Here is the same section that you also have in your image

Hi, i am not sure what's going wrong here. but happy to jump on a call and have a look at it. Also looping in @Nok -- Nok do you know what's wrong

hi @Nok, would u be able to help Paul Mora whenever u have the time. I had a quick call with him. We tried restarting Kedro server, uninstalling/reinstalling the extension. The extension works fine on another project; but on this particular CustomerOne project , it didn't work and through KedroLanguageServer attribute error

on the Output tab of VS Code, could you select Kedro on the dropdown and tell us what you see?

FYR there is a command which does this too for people who are less familiar with debugging vscode extension

2025-01-17 18:05:02.430 [info] [Error - 6:05:02 PM] Request textDocument/definition failed.
2025-01-17 18:05:02.430 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 18:05:02.499 [info] [Error - 6:05:02 PM] Request textDocument/definition failed.
2025-01-17 18:05:02.499 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 18:19:36.305 [info] [Error - 6:19:36 PM] Request textDocument/definition failed.
2025-01-17 18:19:36.305 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 18:19:37.024 [info] [Error - 6:19:37 PM] Request textDocument/definition failed.
2025-01-17 18:19:37.025 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]
2025-01-17 18:19:39.234 [info] [Error - 6:19:39 PM] Request textDocument/definition failed.
2025-01-17 18:19:39.234 [info]   Message: AttributeError: 'KedroLanguageServer' object has no attribute 'run_env'
  Code: -32603 
[object Object]

Very likely unexpected error happens very early during the server initialisation.

Did any of the LSP feature works? i.e. autocompletion, find reference, go to definition

Nothing from the kedro plugin works here

In my other project though it runs. Happy to also quickly connect on that if you like.

another QQ: How does the project structured? Can you share the tree view of the directory? Just want to make sure that the project looks like a regular Kedro project.

The extension try its best to identify a Kedro project but sometimes you will need to define the path yourself. This is added only quite recently so it's not released yet.

https://github.com/kedro-org/vscode-kedro/pull/162

Add a reply
Sign up and join the conversation on Slack