Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

repl: Improve iopub connection error messages (#53014)

MostlyK24a6008e5c0b
diff --git a/crates/repl/src/kernels/ssh_kernel.rs b/crates/repl/src/kernels/ssh_kernel.rs
index 53be6622379..797b111a143 100644
--- a/crates/repl/src/kernels/ssh_kernel.rs
+++ b/crates/repl/src/kernels/ssh_kernel.rs
@@ -215,7 +215,7 @@ impl SshRunningKernel {
&session_id,
)
.await
- .context("failed to create iopub connection")?;
+ .context("Failed to create iopub connection. Is `ipykernel` installed in the remote environment? Try running `pip install ipykernel` on the remote host.")?;
let peer_identity = runtimelib::peer_identity_for_session(&session_id)?;
let shell_socket = runtimelib::create_client_shell_connection_with_identity(
diff --git a/crates/repl/src/kernels/wsl_kernel.rs b/crates/repl/src/kernels/wsl_kernel.rs
index d9ac05c5fc8..be76d7ddccb 100644
--- a/crates/repl/src/kernels/wsl_kernel.rs
+++ b/crates/repl/src/kernels/wsl_kernel.rs
@@ -354,7 +354,8 @@ impl WslRunningKernel {
"",
&session_id,
)
- .await?;
+ .await
+ .context("Failed to create iopub connection. Is `ipykernel` installed in the WSL environment? Try running `pip install ipykernel` inside your WSL distribution.")?;
let peer_identity = runtimelib::peer_identity_for_session(&session_id)?;
let shell_socket = runtimelib::create_client_shell_connection_with_identity(