1

I haven’t got internet connection on my work machine, but I’d like to use dash. When I try to run my code with

app.css.config.serve_locally = True
app.scripts.config.serve_locally = True

I also get only white screen without any graphics or errors.
Here some simple code for example:

from jupyter_dash import JupyterDash
import dash_core_components as dcc
import dash_html_components as html

app = JupyterDash('offline example')

app.layout = html.Div([
    dcc.Graph(id='my-graph', figure={'data': [{'x': [1, 2, 3], 'y': [4, 1, 2]}]})
])

app.css.config.serve_locally = True
app.scripts.config.serve_locally = True

if __name__ == '__main__':
    app.run_server(mode=“Inline”)

5eb
  • 14,798
  • 5
  • 21
  • 65
Ikaryssik
  • 73
  • 6

1 Answers1

1

You can always run JupyterDash without an internet connection. So that's not the problem here. I rather think that you haven't installed all components you need to run plotly and JupyterDash properly. If you're able to run the latest versions, take a closer look on how to run all necessary installations here:

You should also take a look at what this youtube channel has to offer on tips & tricks

It may also be the case that you for some reason are not able to launch your app in JupyterLab. You can check this by changing

if __name__ == '__main__':
    app.run_server(mode="Inline")

To:

if __name__ == '__main__':
    app.run_server(mode="external")

Which will fire up the Dash app in your default browser.

vestland
  • 55,229
  • 37
  • 187
  • 305