Tried the code above and had to do some modifications as mentioned by @Snizl.
Haven’t check but probably have the exact same code
import dash
import dash_core_components as dcc
import dash_html_components as html
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(children=[
html.H1(children='Hello Dash'),
html.Div(children='''
Dash: A web application framework for Python.
'''),
dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
{'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
],
'layout': {
'title': 'Dash Data Visualization'
}
}
)
])
if __name__ == '__main__':
app.run_server(debug=True)
This seems to be working fine on my end in Chrome, Firefox and Safari, all close to latest version.
As a first step and for sanity, can you confirm the version of the dash packages being used (both Dash and dependencies) and your Python version? Anything standing out in Chrome’s “Network” tab? Thanks.
i have installed dash through pip sudo pip install dash==1.0.2
[sudo] password for baskar:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory ‘/home/baskar/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/baskar/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting dash==1.0.2
Requirement already satisfied: Flask>=1.0.2 in /usr/local/lib/python2.7/dist-packages (from dash==1.0.2) (1.1.1)
Collecting dash-html-components==1.0.0 (from dash==1.0.2)
Collecting dash-core-components==1.0.0 (from dash==1.0.2)
Collecting dash-renderer==1.0.0 (from dash==1.0.2)
Collecting dash-table==4.0.2 (from dash==1.0.2)
Requirement already satisfied: plotly in /usr/local/lib/python2.7/dist-packages (from dash==1.0.2) (4.0.0)
Requirement already satisfied: flask-compress in /usr/local/lib/python2.7/dist-packages (from dash==1.0.2) (1.4.0)
Requirement already satisfied: PyYAML>=5.1.1 in /usr/local/lib/python2.7/dist-packages (from dash==1.0.2) (5.1.1)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python2.7/dist-packages (from Flask>=1.0.2->dash==1.0.2) (0.24)
Requirement already satisfied: Jinja2>=2.10.1 in /usr/local/lib/python2.7/dist-packages (from Flask>=1.0.2->dash==1.0.2) (2.10.1)
Requirement already satisfied: click>=5.1 in /usr/local/lib/python2.7/dist-packages (from Flask>=1.0.2->dash==1.0.2) (7.0)
Requirement already satisfied: Werkzeug>=0.15 in /usr/local/lib/python2.7/dist-packages (from Flask>=1.0.2->dash==1.0.2) (0.15.5)
Requirement already satisfied: retrying>=1.3.3 in /usr/local/lib/python2.7/dist-packages (from plotly->dash==1.0.2) (1.3.3)
Requirement already satisfied: six in ./.local/lib/python2.7/site-packages (from plotly->dash==1.0.2) (1.10.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from Jinja2>=2.10.1->Flask>=1.0.2->dash==1.0.2) (1.0)
Installing collected packages: dash-html-components, dash-core-components, dash-renderer, dash-table, dash
Successfully installed dash-1.0.2 dash-core-components-1.0.0 dash-html-components-1.0.0 dash-renderer-1.0.0 dash-table-4.0.2
sudo pip install dash-daq==0.1.0
[sudo] password for baskar:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory ‘/home/baskar/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/baskar/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting dash-daq==0.1.0
Installing collected packages: dash-daq
Successfully installed dash-daq-0.1.0
**refer js console and network console screen shot below **
@bas Using the closest setup I can (Python 2.7.15 on MacOS, Chrome 75.0.3770.142, dash==1.0.2 + dash-daq==0.1.0), I’m still unable to reproduce the issue.
The stack in the console error corresponds to the moment where we are processing the content of the _dash_dependencies network request. Trying to find a logical differentiator… could you provide me with:
(1) the response for that request in the network tab,
I have [].
(2) the version of at least the following packages in your environment (taken from a clean virtualenv with only dash+dash-daq installed): dash, dash-core-components, dash-daq, dash-html-components, dash-renderer, dash-table, Flask, Flask-Compress, itsdangerous, Jinja2, MarkupSafe, plotly, PyYAML, retrying, setuptools, six, Werkzeug, wheel.
Looks like the javascript assets are getting blocked. Could you try app.css.config.serve_locally = True? Setting this to False will serve the assets from an external CDN which might be blocked on your network.