Closed Mr-Ruben closed 5 months ago
Is this from the built-in renderer? (is there an option to "change presentation type" in the output menu on the left)
What is the mime type of the output? If you don't have the option to change the presentation, just reopen the file in a text editor and look for the output property in there. Either the output_type, or the key in the data object.
For me, connecting to a server that I created by running jupyter lab
, it's just a plain text output (same as a local kernel) that renders as expected:
"data": {
"text/plain": [
"[1, 2, 3, 4, 5]"
]
But I would assume you're getting something different back as output.
Is this from the built-in renderer? (is there an option to "change presentation type" in the output menu on the left) What is the mime type of the output?
Sorry, but I don't understand where is that (a photo helps).
In any case,
I got this (in VScode)
when I click on 'open in a text editor'
I think that answers your question.
In any case, for me it is not a bug. As I said, I just wanted to document what I found out, which is that the theme style used in Jupyter is passed down to VScode with its output through the kernel. (I hope it is well phrased).
"change presentation" would be in that menu if there is more than one mime type. Also, try the copy output command - that would likely have html, whereas I just get plaintext in the output
Is this from the built-in renderer? (is there an option to "change presentation type" in the output menu on the left) What is the mime type of the output?
Clicking on ...
> change presentation
I got here
I tried the 2 options. If the theme is dark, I get the same results
If I click on ...
> copy cell output
I get
[1m[[0m[38;2;16;16;16m1[0m, [38;2;16;16;16m2[0m, [38;2;139;0;139m'kjkj '[0m, [38;2;16;16;16m888822982[0m[1m][0m
Important (maybe). I got these "Interactive window" or "Notebook" connected to jupyter_kernel using the "jupyter power toys" extension.
interesting, it looks like the kernel running on that jupyter lab server is adding ansi color codes to the output, though I'm not sure why, and I couldn't find any way to configure that to always happen. But I agree, not really something we want to try and fix on our end since someone could be purposefully trying to use text color.
Thanks for helping investigate!
The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.
Happy Coding!
Does this issue occur when all extensions are disabled?: Difficult, because without extension I cannot reach the point.
Version: 1.89.1 Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685 Date: 2024-05-07T05:16:23.416Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Linux x64 4.19.0-24-amd64
Steps to Reproduce:
Findings: This does not happen with non-dark themes. This does not happen when not connecting to existing remote kernels. The data is there, but the numbers have the same color than the background. If I select the output, I can see it. There seems to be an extra line in the output when connecting to existing kernel. No problem with strings, just numbers.
You could say that this is not a bug, I am fine with that. But at least if someone finds the same problem doesn't go nuts figuring out why.
In Jupyterlab
As you can see, the numbers in Jupyterlab seem to be black (in this specific theme), and that color seems to be passed to vscode.
From gpt
To be extra verbose (increase find-ability)