kedro-org / vscode-kedro

Kedro extension for VSCode including LSP and other features
https://marketplace.visualstudio.com/items?itemName=kedro.Kedro
Apache License 2.0
18 stars 2 forks source link

Definitions of datasets doesn't work #6

Closed astrojuanlu closed 6 months ago

astrojuanlu commented 6 months ago

This is what I see in the output:

2024-05-09 08:11:22.961 [info] Failed to handle request 34 textDocument/hover HoverParams(text_document=TextDocumentIdentifier(uri='file:///Users/juan_cano/Projects/QuantumBlackLabs/kedro-mlflow-playground/spaceflights-mlflow3/src/spaceflights_mlflow3/pipelines/data_processing/pipeline.py'), position=18:13, work_done_token=None)
Traceback (most recent call last):
  File "/Users/juan_cano/.vscode/extensions/kedro.kedro-0.0.1/bundled/libs/pygls/protocol/json_rpc.py", line 266, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "/Users/juan_cano/.vscode/extensions/kedro.kedro-0.0.1/bundled/libs/pygls/protocol/json_rpc.py", line 188, in _execute_request
    self._send_response(msg_id, handler(params))
                                ^^^^^^^^^^^^^^^
  File "/Users/juan_cano/.vscode/extensions/kedro.kedro-0.0.1/bundled/tool/lsp_server.py", line 609, in hover
    model_option = ls.dummy_catalog.load("params:model_options")
                   ^^^^^^^^^^^^^^^^
AttributeError: 'KedroLanguageServer' object has no attribute 'dummy_catalog'
astrojuanlu commented 6 months ago

For the record, I created the project with kedro new --starter=spaceflights-pandas-viz --name spaceflights-mlflow3

noklam commented 6 months ago

@astrojuanlu Are you able to run kedro run in the same environment? It's likely some error happens when bootstrap_project fails and the component isn't created properly.

astrojuanlu commented 6 months ago
  1. kedro new --starter=spaceflights-pandas-viz --name test-kedro-vscode && cd test-kedro-vscode
  2. uv venv && uv pip install -r requirements.txt && uv pip uninstall kedro-telemetry
  3. Set interpreter
  4. Verify that kedro run works
  5. Close IDE (just in case)
  6. Open it again.
  7. Hover with the mouse or try to get definitions, see the errors in the "Output" tab immediately.
astrojuanlu commented 6 months ago

This is fixed in 0.0.2 🎉