set evalue to a one space string for truthiness on old jupyter (#20531)

"Fixes" the exception display issue of #20524 on older versions of
Jupyter that required `evalue` to be truthy. For now, until we can do
proper processing of the `ExceptionDetails` this will make Jupyter
Notebook 6.5.1 and below happy.

This is the alternative "just work now" PR to #20530
This commit is contained in:
Kyle Kelley 2023-09-16 19:02:21 -07:00 committed by GitHub
parent e995ba66cd
commit 3b2e553b05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -358,7 +358,7 @@ impl JupyterServer {
.new_message("error")
.with_content(json!({
"ename": err.to_string(),
"evalue": "",
"evalue": " ", // Fake value, otherwise old Jupyter frontends don't show the error
"traceback": [],
}))
.send(&mut *self.iopub_socket.lock().await)
@ -425,7 +425,7 @@ impl JupyterServer {
.new_message("error")
.with_content(json!({
"ename": name,
"evalue": "",
"evalue": " ", // Fake value, otherwise old Jupyter frontends don't show the error
"traceback": [],
}))
.send(&mut *self.iopub_socket.lock().await)