Skip to content

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

Merged
etpinard merged 3 commits into
masterfrom
offline-fix
Aug 17, 2016
Merged

Make temporary fix to plotly.min.js so that it loads in offline module#545
etpinard merged 3 commits into
masterfrom
offline-fix

Conversation

@etpinard
Copy link
Copy Markdown
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
Copy Markdown
Member

cldougl commented Aug 17, 2016

tested! 💃

@cldougl
Copy link
Copy Markdown
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
Copy Markdown

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