You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should create an interactive Jupyter table in the Viewer pane. Instead, we get this nonsense in the Plots pane:
The problem here is that itables uses init_notebook_mode to inject dependencies; in this case, a <script> tag that loads the necessary JavaScript libraries.
Later, when you run show(df), the itable is supposed to be rendered, like this. The render step presumes that the scripts injected by the dependency step (i.e. init_notebook_mode) are already loaded in the notebook.
But in Positron, there are two distinct issues that keep this from working:
Positron doesn't know what to do with the dependencies; they are emitted as plain HTML, so we try to render them like a plot. Of course, they aren't a plot, and errors ensue.
When Positron attempts to render the table, it does so in a clean webview that does not have the dependencies loaded. Consequently, the render fails, too.
So this simple example generates two or three busted outputs in Positron. I'm not sure the best way to address this, but it could look something like:
analyze the HTML of text/html output to see if it contains any renderable content or just scripts
if it's all scripts, add (or amend) its content to a global
when rendering text/html output, inject the contents of the global into the <head> tag.
The text was updated successfully, but these errors were encountered:
To reproduce, try running this example (from itables):
This should create an interactive Jupyter table in the Viewer pane. Instead, we get this nonsense in the Plots pane:
The problem here is that itables uses
init_notebook_mode
to inject dependencies; in this case, a<script>
tag that loads the necessary JavaScript libraries.Later, when you run
show(df)
, the itable is supposed to be rendered, like this. The render step presumes that the scripts injected by the dependency step (i.e.init_notebook_mode
) are already loaded in the notebook.But in Positron, there are two distinct issues that keep this from working:
So this simple example generates two or three busted outputs in Positron. I'm not sure the best way to address this, but it could look something like:
text/html
output to see if it contains any renderable content or just scriptstext/html
output, inject the contents of the global into the<head>
tag.The text was updated successfully, but these errors were encountered: