-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type application/vnd.dataresource+json
does not produce any visible output
#189
Comments
@DonJayamanne since i've been pointed here, may i ask pointers on where to look for in order to fix this issue? I'm interested in opening a PR. |
bumping this. It seems like it's using an unmaintained package for handling the datatype. @DonJayamanne Could we just drop support for this mimetype and let vscode-jupyter fall back to |
Hello, So, I would like to see support for the application/vnd.dataresource+json mimetype in VS Code, similar to Azure Data Studio. Thank you! |
@soonbro Technically, vscode-notebook-renderers/package.json Line 88 in 963366c
The problem is that it doesn't work (last I checked). The fact that it lists this at all is why we're getting the blank output. Otherwise, rendering it wouldn't even be an option and only the I haven't looked too deeply into why it doesn't work. I know this plugin uses some ancient libraries which are no longer maintained. Some aren't even the latest versions of those libraries. Many of the libraries come from the |
For Deno I use the following workaround display function: // Strip `application/vnd.dataresource+json` from Jupyter display bundle.
// Workaround for: https://github.com/microsoft/vscode-notebook-renderers/issues/189
export const vscd = async (
obj: unknown,
options: { raw: boolean; update: boolean; display_id?: string } = { raw: false, update: false }
): Promise<void> => {
const bundle = (await (obj as any)[Symbol.for('Jupyter.display')]?.()) ?? {};
const { 'application/vnd.dataresource+json': _json, ...strippedBundle } = bundle;
const message_type = options.update ? 'update_display_data' : 'display_data';
const transient = options.display_id ? { display_id: options.display_id } : {};
Deno.jupyter.broadcast(message_type, { data: strippedBundle, metadata: {}, transient });
return;
}; and then wrap the object I want to display in I guess the same workaround can be done with other kernels as well. |
@SC-CTS, you can change the renderer of the output cell to |
I first discovered this issue while trying to use
nodejs-polars
in a Deno Jupyter kernel. Here's the example code for a notebook cell in Python:Using the
text/html
presentation works fine. But theapplication/vnd.dataresource+json
presentation does not, and produces basically nothing:VS Code version: 1.85.1
Extension version: 1.0.17
OS: Windows 10
The text was updated successfully, but these errors were encountered: