How to connect to plotly via Jupyter notebook on Cocalc?

I’m totally new to plotly and jupyter on Cocalc. I created an account with plotly and added the following in my jupyter notebook to connect to plotly :

import plotly.plotly as py
import plotly.graph_objs as go
import plotly.figure_factory as ff
py.sign_in(“deleted”, “deleted”)

Is this the correct approach because I end up with

PlotlyRequestError: Bad API key
PlotlyError: Sign in failed.

I read the user manual but I couldn’t find anything that helped me get started within the Cocalc environment. I send a support request to Cocalc and they said its working fine maybe my login details are incorrect. Well, I tested them many times and no, my login is correct.

Thanks in advance for any help.

Hi @Dan_D,

I’m not very familiar with Cocalc, but perhaps there is some kind of firewall or proxy configuration interfering with the communication with chart studio.

Have you tried using plotly in offline mode?

from plotly.offline import init_notebook_mode, iplot
init_notebook_mode()

fig = ...
iplot(fig)

If not, I’d recommend giving that a try.
-Jon