Skip to content

Show Displays Resulting in Blank Cell Output - Dash mode = "external"? #229

@MeredithHilgeman

Description

@MeredithHilgeman

When I try to use the show function to display any output the cell will run without errors, however there is a blank cell output with no interactive display. I have used the set_show_addr((ip,port)) function to set the appropriate ip address and port for my server/instance, so the cell runs just fine, it's just the display that is missing:
interpret_show_issue

After some investigating I think it has to do with dash. When I run the dash demo below I get the same blank cell output with mode = "inline", however I am able to get the expected output with mode = "external". Do you have any insight into why the external mode seems to work for dash and not the inline mode? Are there any plans or thoughts around adding an option to the interpret package for setting the dash mode to external for displays, much like I was able to set up ip address and port?

Dash Demo:

import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
from dash.dependencies import Input, Output
from jupyter_dash import JupyterDash
 
df = px.data.tips()
 
app = JupyterDash(__name__)
app.layout = html.Div(
    [
        html.H1("JupyterDash Demo"),
        dcc.Graph(id="graph"),
        html.Label(
            [
                "colorscale",
                dcc.Dropdown(
                    id="colorscale-dropdown",
                    clearable=False,
                    value="plasma",
                    options=[
                        {"label": c, "value": c} for c in px.colors.named_colorscales()
                    ],),]),])
 
 
@app.callback(Output("graph", "figure"), [Input("colorscale-dropdown", "value")])
def update_figure(colorscale):
    return px.scatter(
        df,
        x="total_bill",
        y="tip",
        color="size",
        color_continuous_scale=colorscale,
        render_mode="webgl",
        title="Tips",
    )

Cell runs, but output is blank:

app.run_server(
    mode="inline",
    host="__server__.__company__.com"
)

Cell runs and output can be seen in a new tab that pops up:

app.run_server(mode="external", host="__server__.__company__.com")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions