Hello! Iām not too sure what Iām doing wrong with my below code. Everything was working fine yesterday I was able to view my 2 pie charts in a browser and see valid data. Today nothing is pulling up in a browser. I Regenerated my API key and reinstalled plot.ly. Any help would be great!
def plot_events_by_formats(format_events):
labels = []
values = []
for each in format_events:
labels.append(each)
value = format_events[each]
values.append(len(value))
trace = go.Pie(labels=labels, values=values)
py.plot([trace], filename='Events by Formats')
def plot_events_by_categories(category_events):
labels = []
values = []
for each in category_events:
labels.append(each)
value = category_events[each]
values.append(len(value))
trace = go.Pie(labels=labels, values=values)
py.plot([trace], filename='Events by Categories')
show_events_by_formats(format_events_)
show_events_by_categories(category_events_)
try:
plot_events_by_formats(format_events_)
plot_events_by_categories(category_events_)
except:
print("Error in using plotly, Please follow instructions in Readme.md")