Network-graphs example is not working

Hi,

I was trying to draw a tree graph. I tried the following example:

I got the following error message:

Traceback (most recent call last):

File “”, line 65, in
for node, adjacencies in enumerate(G.adjacency_list()):

AttributeError: ‘Graph’ object has no attribute ‘adjacency_list’

I am using python 3.5 + networkx 2.1. I searched networkx official document, it only say ‘adjancency_list()’ method changes, while no details.

Any suggestion?

Thanks!

Probably best to ask this question in https://community.plotly.com/c/api/python

Change

for node, adjacencies in enumerate(G.adjacency_list()):

for

for node, adjacencies in enumerate(G.adjacency()):