Skip to content

Make temporary fix to plotly.min.js so that it loads in offline module #545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 17, 2016

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Aug 17, 2016

As first discovered in this forum post, offline is broken ever since #538 where plotly.js got bumped to from the 1.14.x series to the 1.16.2.

More precisely, init_notebook_mode() (with the default connected=False) fails to load plotly.js as a require.js module. From my observations, the CDN link (with connected=True) appears to load fine.

Something is up with a mapbox-gl dependency called webworkify in a minified bundle. See browserify/webworkify#29 for more info. Ideally, this issue should be fixed upstream.

But for now, I propose a uber hacky fix where I manually fix the minified bundle.

For those interested in non-nonsensical JS drama, I had to replace

image

by

image

to get offline working again.

- browserify/webworkify#29
- offline was broken in plotly.py 1.12.6 where
  plotly.js was updated to 1.16.4
@cldougl
Copy link
Member

cldougl commented Aug 17, 2016

tested! 💃

@cldougl
Copy link
Member

cldougl commented Aug 17, 2016

@etpinard do you mind bumping the version # here too so I can update the package on pip w/ this fix

@etpinard etpinard merged commit 88189c7 into master Aug 17, 2016
@etpinard etpinard deleted the offline-fix branch August 17, 2016 15:31
etpinard added a commit to plotly/plotly.js that referenced this pull request Sep 7, 2016
@armanw96
Copy link

hey mine still won't work and i don't undertand how you fix it so easily please help @ etpinard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants