Black Lives Matter. Please consider donating to Black Girls Code today.

'Error loading dependencies' trying to create a bullet chart

I’m trying to create a simple app with a bullet chart. However, I get a ‘Error loading dependencies’ I can’t solve.

import dash
import dash_html_components as html
import dash_core_components as dcc
import plotly.figure_factory as ff

app = dash.Dash(__name__)

app.layout = html.Div(
    [
        html.Span('Foo'),
        ff.create_bullet(
            orientation='h',
            ranges='range',
            measures='data',
            data=[dict(
                range=[.4, .5, 1],
                data=[0, .42],
            )],
        ),
    ]
)

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

Can you reproduce it on your side?
(I get the same error on Firefox DevEd 64.0b6 and Chromium 70.0.3538.77)

The app runs flawlessly:

$ python test.py 
 * Serving Flask app "test" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 313-875-047
127.0.0.1 - - [05/Nov/2018 20:22:50] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [05/Nov/2018 20:22:50] "GET /_dash-layout HTTP/1.1" 200 -
127.0.0.1 - - [05/Nov/2018 20:22:50] "GET /_dash-dependencies HTTP/1.1" 200 -
127.0.0.1 - - [05/Nov/2018 20:22:51] "GET /_favicon.ico HTTP/1.1" 200 -

The network seems clean too:

However, the JS console throws a couple of errors:

bundle.js:14:5748
Object

{…}

data: Array(6) [ {…}, {…}, {…}, … ]

layout: Object { title: “Bullet Chart”, height: 600, width: 1000, … }

<prototype>: Object { … }

s [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:14:5748](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) s [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:14:5724](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) value [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:14:6753](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) _renderValidatedComponentWithoutOwnerOrContext [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:10748](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _renderValidatedComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:10872](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) performInitialMount [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:6691](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) mountComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:5737](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) mountComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:18731](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) updateChildren [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:2956](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _reconcilerUpdateChildren [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:15091](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _updateChildren [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:15853](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) updateChildren [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:15751](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _updateDOMChildren [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:21826](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) updateComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:20050](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) receiveComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:19603](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) receiveComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:19125](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _updateRenderedComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:10219](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _performComponentUpdate [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:9973](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) updateComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:9251](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) receiveComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:8362](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) receiveComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:19125](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _updateRenderedComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:10219](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) _performComponentUpdate [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:9973](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) updateComponent [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:9251](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) performUpdateIfNecessary [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:13:8578](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) performUpdateIfNecessary [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:19307](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) s [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:23342](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:8934](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:8934](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:24406](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) T [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:24583](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) close [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:23982](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) closeAll [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:9522](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:9014](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:24406](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) T [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:24583](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) close [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:23982](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) closeAll [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:9522](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:9014](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:24406](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) T [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:24583](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) closeAll [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:9522](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) perform [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:15:9014](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) batchedUpdates [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:3912](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) u [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:23624](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) r [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:21389](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) enqueueSetState [https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js:14:22386](https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js) [6]&lt;/r.prototype.setState [https://unpkg.com/react@15.4.2/dist/react.min.js:12:7755](https://unpkg.com/react@15.4.2/dist/react.min.js) c/&lt;/r&lt;/a.prototype.handleChange [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:28:6279](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) f [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:13:26431](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) n/&lt;/&lt;/&lt; [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:28:15755](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) dispatch [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:28:16111](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js) u/&lt;/&lt;/&lt; [https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js:2:24710](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js)

Error: "component.type is undefined" renderer 0.13.0/dash_renderer/bundle.js:14:5783 renderer 0.13.0/dash_renderer/bundle.js:14:5724 renderer 0.13.0/dash_renderer/bundle.js:14:6753 dom 15.4.2/dist/react-dom.min.js:13:10748 dom 15.4.2/dist/react-dom.min.js:13:10872 dom 15.4.2/dist/react-dom.min.js:13:6691 dom 15.4.2/dist/react-dom.min.js:13:5737 dom 15.4.2/dist/react-dom.min.js:14:18731 dom 15.4.2/dist/react-dom.min.js:13:2956 dom 15.4.2/dist/react-dom.min.js:14:15091 dom 15.4.2/dist/react-dom.min.js:14:15853 dom 15.4.2/dist/react-dom.min.js:14:15751 dom 15.4.2/dist/react-dom.min.js:13:21826 dom 15.4.2/dist/react-dom.min.js:13:20050 dom 15.4.2/dist/react-dom.min.js:13:19603 dom 15.4.2/dist/react-dom.min.js:14:19125 dom 15.4.2/dist/react-dom.min.js:13:10219 dom 15.4.2/dist/react-dom.min.js:13:9973 dom 15.4.2/dist/react-dom.min.js:13:9251 dom 15.4.2/dist/react-dom.min.js:13:8362 dom 15.4.2/dist/react-dom.min.js:14:19125 dom 15.4.2/dist/react-dom.min.js:13:10219 dom 15.4.2/dist/react-dom.min.js:13:9973 dom 15.4.2/dist/react-dom.min.js:13:9251 dom 15.4.2/dist/react-dom.min.js:13:8578 dom 15.4.2/dist/react-dom.min.js:14:19307 dom 15.4.2/dist/react-dom.min.js:14:23342 dom 15.4.2/dist/react-dom.min.js:15:8934 dom 15.4.2/dist/react-dom.min.js:15:8934 dom 15.4.2/dist/react-dom.min.js:14:24406 dom 15.4.2/dist/react-dom.min.js:14:24583 dom 15.4.2/dist/react-dom.min.js:14:23982 dom 15.4.2/dist/react-dom.min.js:15:9522 dom 15.4.2/dist/react-dom.min.js:15:9014 dom 15.4.2/dist/react-dom.min.js:14:24406 dom 15.4.2/dist/react-dom.min.js:14:24583 dom 15.4.2/dist/react-dom.min.js:14:23982 dom 15.4.2/dist/react-dom.min.js:15:9522 dom 15.4.2/dist/react-dom.min.js:15:9014 dom 15.4.2/dist/react-dom.min.js:14:24406 dom 15.4.2/dist/react-dom.min.js:14:24583 dom 15.4.2/dist/react-dom.min.js:15:9522 dom 15.4.2/dist/react-dom.min.js:15:9014 dom 15.4.2/dist/react-dom.min.js:14:3912 dom 15.4.2/dist/react-dom.min.js:14:23624 dom 15.4.2/dist/react-dom.min.js:14:21389 dom 15.4.2/dist/react-dom.min.js:14:22386 react 15.4.2/dist/react.min.js:12:7755 renderer 0.13.0/dash_renderer/bundle.js:28:6279 renderer 0.13.0/dash_renderer/bundle.js:13:26431 renderer 0.13.0/dash_renderer/bundle.js:28:15755 renderer 0.13.0/dash_renderer/bundle.js:28:16111 renderer 0.13.0/dash_renderer/bundle.js:2:24710 [bundle.js:2:24835](https://unpkg.com/dash-renderer@0.13.0/dash_renderer/bundle.js)

it needs to be dcc.Graph(figure=ff.create_bullet(...))

Thank you! (-: it is indeed a silly mistake — I’m still lacking experience with Dash/plotly to evaluate to which class/type do objects belong.