---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-f538110f0f25> in <module>()
3 testgraph = nx.Graph()
4 testgraph.add_node(1, label='ä')
----> 5 nx.write_gml(testgraph, '/tmp/test.gml')
/usr/local/lib/python2.7/dist-packages/networkx/readwrite/gml.pyc in write_gml(G, path)
/usr/local/lib/python2.7/dist-packages/networkx/utils/decorators.pyc in _open_file(func, *args, **kwargs)
218 # Finally, we call the original function, making sure to close the fobj.
219 try:
--> 220 result = func(*new_args, **kwargs)
221 finally:
222 if close_fobj:
/usr/local/lib/python2.7/dist-packages/networkx/readwrite/gml.pyc in write_gml(G, path)
427 >>> nx.write_gml(G,"test.gml.gz")
428 """
--> 429 for line in generate_gml(G):
430 line += '\n'
431 path.write(line.encode('ascii', 'xmlcharrefreplace'))
/usr/local/lib/python2.7/dist-packages/networkx/readwrite/gml.pyc in generate_gml(G)
365 # Need to escape & and " with HTML entities
366 label = escape(label, quote=True)
--> 367 yield 2 * indent + 'label "{0}"'.format(label)
368 if n in G:
369 for k,v in G.node[n].items():
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)