Unable to render plotly cells
Unable to render an nteract=0.14.0 notebook with @nteract/commuter=5.8.0 when there is a Plotly cell. Error below.
Simple plot (Full gist of the complete notebook+output):
import plotly
import plotly.graph_objs as go
from plotly.offline import plot, iplot
plotly.offline.init_notebook_mode()
iplot([go.Scatter(x=[1, 2, 3], y=[3, 1, 6])])
Commuter output:
TypeError: Cannot read property 'bind' of undefined
at new PlotlyTransform (/usr/lib/node_modules/@nteract/commuter/.next/server/static/9E3FqjkvyCBU2iAUucvG0/pages/view.js:779:39)
at c (/usr/lib/node_modules/@nteract/commuter/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:323)
at Sa (/usr/lib/node_modules/@nteract/commuter/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:1)
at a.render (/usr/lib/node_modules/@nteract/commuter/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:467)
at a.read (/usr/lib/node_modules/@nteract/commuter/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:58)
at renderToString (/usr/lib/node_modules/@nteract/commuter/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:53:83)
at renderPage (/usr/lib/node_modules/@nteract/commuter/node_modules/next/dist/server/render.js:319:26)
at Function.getInitialProps (/usr/lib/node_modules/@nteract/commuter/.next/server/static/9E3FqjkvyCBU2iAUucvG0/pages/_document.js:305:25)
at _callee$ (/usr/lib/node_modules/@nteract/commuter/node_modules/next/dist/lib/utils.js:86:30)
at tryCatch (/usr/lib/node_modules/@nteract/commuter/node_modules/regenerator-runtime/runtime.js:62:40)
::ffff:127.0.0.1 - - [01/May/2019:19:31:08 +0000] "GET /view/sample_plotlyfull.ipynb HTTP/1.1" 500 6672
::ffff:127.0.0.1 - - [01/May/2019:19:31:09 +0000] "GET /static/nprogress.css HTTP/1.1" 304 -
::ffff:127.0.0.1 - - [01/May/2019:19:31:09 +0000] "GET /static/commuter.css HTTP/1.1" 304 -
Hello @Jerdak! Thanks for opening this issue and providing a sample. I was able to reproduce the issue with it.
This seems like it might be an issue with the PlotlyTransform. I'll see if I can reproduce outside commuter.
It might have been fixed with following commit https://github.com/nteract/commuter/commit/c2e81d2184d0579f78a422f66fbdf7cb698bfb07 (:
This is great, I happen to need this fix 💪 . Is there a release planned with this commit @taniki ?
@gonzalodiaz Good call! We should release this. I'll be able to cut a release sometime this weekend.