Skip to content
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

MIME does not allow binary data #293

Closed
mwisnicki opened this issue Jul 3, 2021 · 1 comment
Closed

MIME does not allow binary data #293

mwisnicki opened this issue Jul 3, 2021 · 1 comment

Comments

@mwisnicki
Copy link

README says:

fun MIME(vararg mimeToData: Pair<String, Any>): MimeTypedResult 

which had me hoping I can pass binary data for non-text formats but the actual signature is:

fun MIME(vararg mimeToData: Pair<String, String>): MimeTypedResult

Passing PNG as ISO-8859-1 encoded String didn't work too.

ileasile added a commit that referenced this issue Jul 3, 2021
@ileasile
Copy link
Contributor

ileasile commented Jul 3, 2021

We follow messaging protocol, and using this low-level API is in strict correlation with its documentation:
https://jupyter-client.readthedocs.io/en/stable/messaging.html#display-data

The fact that you have no visible result in browser is because jupyter-notebook client does not support image/png MIME type. You still can render images using text/html or use corresponding convenience methods

@ileasile ileasile closed this as completed Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants