Black Lives Matter. Please consider donating to Black Girls Code today.

PlotlyError: Sign in failed

Dear plotly-community,

I am using Jupyter notebook on Anaconda and want to use the online mode of plotly (the offline version works fine). There is, however, the problem of signing in. I did all the steps that are explained on “getting started” and also regenerated the API key.

My code looks like this:

import plotly‘LiNux’, api_key=‘xxxxxxx’)
import plotly.plotly as py
import plotly.graph_objs as go

py.sign_in(‘LiNux’, ‘xxxxxxx’)

According to the explanation on “Getting started”, there should be a ~/.plotly/.credentials file in my home directory. But I can’t find one. I don’t know what’s wrong.

Help is much appreciated! Thanks!

Hi @LiNux,

The settings directory path is stored in the plotly.files.PLOTLY_DIR variable, and the path to the credentials file is stored in the plotly.files.CREDENTIALS_FILE variable. Could you double check that these paths make sense? You can list the files in the PLOTLY_DIR directly from Python using:

import os
import plotly

These files should be initialized when you call for the first time. Also, what version of are you using?