0

When I run dash app using the code below in jupyterlab (AWS Sagemaker), the plot is blank.

from dash import Dash, html, dcc, Output, Input, callback
import plotly.express as px
import pandas as pd

app = Dash(__name__)

app.layout = html.Div(children='Hello World')

if __name__ == '__main__':
    app.run_server(debug=True)

Library versions:

  • Flask==2.1.0
  • Werkzeug==2.2.2
  • dash ==2.18.2 (version above 2.11 for inline display in jupyterlab)
  • plotly == 5.24.1
  • jupyterlab == 4.3.4

Blank output: Output

To display "Hello World" in the dashboard.

4
  • Dash is not defined anywhere. Did you forget to import some libraries? The code you posted in not complete and depends on the previous execution of other cells which you haven;t posted. Commented Feb 14 at 11:59
  • Added complete code, Commented Feb 14 at 12:24
  • I had to add plotly[express] and pandas as requirements with those imports but it then ran in the browser displaying "Hello World" - there was no involvement from jupyter. Commented Feb 14 at 13:27
  • If I run this in a notebook opened in jupyter lab, it displays "Hello World" inline (I've commented out the non-dash imports). Commented Feb 14 at 13:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.