Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

"TypeError: H is not a function" when selecting scatter points #526

Closed
slishak opened this issue Apr 15, 2019 · 4 comments
Closed

"TypeError: H is not a function" when selecting scatter points #526

slishak opened this issue Apr 15, 2019 · 4 comments

Comments

@slishak
Copy link

slishak commented Apr 15, 2019

I'm not sure if this is a bug in Dash or Plotly.js, but seeing as I can't reproduce it when saving the figure with plotly.offline.plot, I'll put it here.

Whenever I select scatter points in a Dash app, I've started getting the following error:

image

It doesn't seem to affect the running of the app, any callbacks are still fired for the selected points.

Simplest example to reproduce:

import dash
import dash_core_components as dcc
import dash_html_components as html
import random

app = dash.Dash()

app.layout = html.Div([
    dcc.Graph(
        id='example-graph',
        figure={
            'data': [
                {
                    'x': [random.random() for _ in range(20)],
                    'y': [random.random() for _ in range(20)],
                    'type': 'scatter',
                    'mode': 'markers'

                }
            ],
            'layout': {
                'dragmode': 'select'
            }
        }
    )
])

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

Versions:

dash==0.41.0
dash-core-components==0.46.0
dash-html-components==0.15.0
dash-renderer==0.22.0
plotly==3.7.1

Also, for some reason I'm not getting the dev bundles when I set dev_tools_serve_dev_bundles=True, so sorry if the stack trace isn't very helpful!

@alexcjohnson
Copy link
Collaborator

Yes, this should not affect anything, and will be fixed when we update plotly.js to 1.47.1 or greater - plotly/plotly.js#3755

I doubt we'll make a patch release just for this though, probably we'll wait for 1.48 and include this in the next minor dash release.

@alexcjohnson
Copy link
Collaborator

Also re: dev bundles - we haven't included a plotly.js dev bundle, only the production version. I think that makes sense, as plotly.js has its own js-only development workflow that we want to keep independent of dash - before something is declared a plotly.js bug it should be replicated in pure js, ie codepen or similar.

@slishak
Copy link
Author

slishak commented Apr 15, 2019

OK, thanks very much! Didn't realise that was the same issue. And understood about the dev bundle, makes sense.

@slishak
Copy link
Author

slishak commented Dec 3, 2019

This has been fixed by a plotly.js update.

@slishak slishak closed this as completed Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants