[(7, 3), (10, 4), (1, 3), (9, 1), (6, 6), (3, 0), (8, 0), (5, 4), (2, 1), (5, 6), (2, 6), (1, 6), (9, 4), (5, 1), (2, 5), (8, 5), (0, 3), (7, 2), (4, 0), (1, 2), (9, 0), (3, 3), (2, 0), (8, 1), (10, 3), (7, 6), (4, 4), (10, 0), (6, 3), (1, 5), (3, 6), (2, 2), (8, 6), (5, 3), (4, 1), (1, 1), (6, 4), (3, 2), (0, 0), (5, 0), (7, 1), (4, 5), (0, 4), (5, 5), (1, 4), (6, 0), (7, 5), (2, 3), (10, 1), (9, 5), (9, 3), (4, 2), (1, 0), (9, 6), (6, 5), (3, 5), (0, 1), (8, 3), (7, 0), (4, 6), (10, 5), (9, 2), (5, 2), (6, 1), (3, 1), (10, 6), (8, 2), (0, 2), (7, 4), (0, 6), (6, 2), (4, 3), (0, 5), (10, 2), (3, 4), (2, 4), (8, 4)]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-51-513db97717a9> in <module>()
10 nx.set_node_attributes(G, 'pos', pos)
11 nx.set_node_attributes(G, 'labels', labels)
---> 12 nx.set_edge_attributes(G,'costs',costs)
13 nx.draw_networkx(G, pos=nx.get_node_attributes(G, 'pos'),
14 labels=nx.get_node_attributes(G, 'labels'),
C:\Anaconda\lib\site-packages\networkx\classes\function.pyc in set_edge_attributes(G, name, values)
400 else:
401 for (u, v), value in values.items():
--> 402 G[u][v][name] = value
403
404
C:\Anaconda\lib\site-packages\networkx\classes\graph.pyc in __getitem__(self, n)
405 {1: {}}
406 """
--> 407 return self.adj[n]
408
409 def add_node(self, n, attr_dict=None, **attr):
KeyError: 7