Skip to content

Commit

Permalink
made a copy of nodes for iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
malonge committed May 30, 2021
1 parent 8981833 commit 924d6ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ragtag_utilities/ScaffoldGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def write_gml(self, f):

# networkx doesn't like writing non-string attributes to GML
for u, v in G.edges:
for key in G[u][v]:
for key in list(G[u][v].keys()):
G[u][v][key] = str(G[u][v][key])
nx.readwrite.gml.write_gml(G, f)

Expand All @@ -284,7 +284,7 @@ def connect_and_write_gml(self, f):

# networkx doesn't like writing non-string attributes to GML
for u, v in G.edges:
for key in G[u][v]:
for key in list(G[u][v].keys()):
G[u][v][key] = str(G[u][v][key])
nx.readwrite.gml.write_gml(G, f)

Expand Down

0 comments on commit 924d6ed

Please sign in to comment.