You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First of all, thank you for creating this extension!
I have a problem with enabling it on multi-root VSCode workspace. I have one project with Kedro (installed in venv) and multiple of other projects (each with its own venv) without it.
The extension works correctly if I open one project directly.
Here are the logs from the beginning. I redacted it, but the important part is that its choosing the other project without Kedro - the 29th project in the workspace file (it's not first even alphabetically). The first entry is the one with Kedro:
2024-05-15 11:01:30.212 [info] Name: Kedro
2024-05-15 11:01:30.212 [info] Module: kedro
2024-05-15 11:01:30.212 [info] Python extension loading
2024-05-15 11:01:30.212 [info] Python Interpreter:
2024-05-15 11:01:30.212 [info] Waiting for interpreter from python extension.
2024-05-15 11:01:30.212 [info] Python extension loaded
2024-05-15 11:01:30.230 [info] Server run command: /Users/kacper.lesniara/Projects/<the_other_project_without_kedro>/venv/bin/python /Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/bundled/tool/lsp_server.py
2024-05-15 11:01:30.231 [info] Server: Start requested.
2024-05-15 11:01:31.479 [info] Traceback (most recent call last):
File "/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/bundled/tool/lsp_server.py", line 17, in<module>
2024-05-15 11:01:31.479 [info] from kedro.config import OmegaConfigLoader
ModuleNotFoundError: No module named 'kedro'
Here are the error logs from the end:
2024-05-15 12:40:20.562 [info] [Error - 12:40:20] Client Kedro: connection to server is erroring. Shutting down server.
2024-05-15 12:40:20.562 [info] [Error - 12:40:20] Stopping server failed
2024-05-15 12:40:20.562 [info] Error: Client is not running and can't be stopped. It's current state is: starting
at w.shutdown (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/common/client.js:914:29)
at w._serverProcess (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/common/client.js:889:30)
at w.stop (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/node/main.js:152:38)
at w.handleConnectionError (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/common/client.js:1147:67)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-15 12:40:20.562 [info] [Error - 12:40:20] Server initialization failed.
2024-05-15 12:40:20.562 [info] Message: write EPIPE
Code: -32099
2024-05-15 12:40:20.562 [info] [Error - 12:40:20] Kedro client: couldn't create connection to server.2024-05-15 12:40:20.562 [info] Message: write EPIPE Code: -32099 2024-05-15 12:40:20.562 [info] [Error - 12:40:20] Restarting server failed2024-05-15 12:40:20.562 [info] Message: write EPIPE Code: -32099 2024-05-15 12:40:20.563 [info] [Info - 12:40:20] Connection to server got closed. Server will restart.2024-05-15 12:40:20.563 [info] true2024-05-15 12:40:20.590 [info] Traceback (most recent call last): File "/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/bundled/tool/lsp_server.py", line 17, in <module>2024-05-15 12:40:20.590 [info] from kedro.config import OmegaConfigLoaderModuleNotFoundError: No module named 'kedro'2024-05-15 12:40:20.594 [info] [Error - 12:40:20] Client Kedro: connection to server is erroring. Shutting down server.2024-05-15 12:40:20.594 [info] [Error - 12:40:20] Stopping server failed2024-05-15 12:40:20.594 [info] Error: Client is not running and can't be stopped. It's current state is: starting at w.shutdown (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/common/client.js:914:29) at w._serverProcess (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/common/client.js:889:30) at w.stop (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/node/main.js:152:38) at w.handleConnectionError (/Users/kacper.lesniara/.vscode/extensions/kedro.kedro-0.0.3/dist/webpack:/Kedro/node_modules/vscode-languageclient/lib/common/client.js:1147:67) at processTicksAndRejections (node:internal/process/task_queues:95:5)2024-05-15 12:40:20.594 [info] [Error - 12:40:20] Server initialization failed.2024-05-15 12:40:20.594 [info] Message: write EPIPE Code: -32099 2024-05-15 12:40:20.594 [info] [Error - 12:40:20] Kedro client: couldn't create connection to server.
2024-05-15 12:40:20.594 [info] Message: write EPIPE
Code: -32099
2024-05-15 12:40:20.594 [info] [Error - 12:40:20] Restarting server failed
2024-05-15 12:40:20.594 [info] Message: write EPIPE
Code: -32099
2024-05-15 12:40:20.595 [info] [Error - 12:40:20] The Kedro server crashed 5 timesin the last 3 minutes. The server will not be restarted. See the output for more information.
Going into the project's .py files to activate the Python extension (to have the correct venv selected) and running kedro: Restart Server doesn't help.
Workaround:
I supplied the kedro.interpreter at the workspace level to point to the project's python executable with Kedro, restarted VSCode and it works. However, as this is a global solution (for the entire workspace), if I had multiple kedro, kedro-datasets versions across different projects some things may break potentially?
Potential fix / implementation:
Use kedro from the particular project's venv. Spin up multiple kedro-servers (one per project if needed). For inspiration - see how the mypy extension works. By default it uses global mypy, but specifying mypy.runUsingActiveInterpreter to true on a project-level enables using locally installed mypy
Hi! First of all, thank you for creating this extension!
I have a problem with enabling it on multi-root VSCode workspace. I have one project with Kedro (installed in venv) and multiple of other projects (each with its own venv) without it.
The extension works correctly if I open one project directly.
Here are the logs from the beginning. I redacted it, but the important part is that its choosing the other project without Kedro - the 29th project in the workspace file (it's not first even alphabetically). The first entry is the one with Kedro:
Here are the error logs from the end:
Going into the project's
.py
files to activate the Python extension (to have the correct venv selected) and runningkedro: Restart Server
doesn't help.Workaround:
I supplied the
kedro.interpreter
at the workspace level to point to the project's python executable with Kedro, restarted VSCode and it works. However, as this is a global solution (for the entire workspace), if I had multiple kedro, kedro-datasets versions across different projects some things may break potentially?Potential fix / implementation:
Use kedro from the particular project's venv. Spin up multiple kedro-servers (one per project if needed). For inspiration - see how the mypy extension works. By default it uses global mypy, but specifying
mypy.runUsingActiveInterpreter
to true on a project-level enables using locally installed mypyInfo:
kedro == 0.19.5
python == 3.10.11
vscode-kedro == 0.0.3
Apple M2
The text was updated successfully, but these errors were encountered: