Could you post a short example code that produces the error?
Since you are using Python2.7, here is a modified version of the
networkx heavy_metal_umlaut.py example that shows how to write a utf-8
encoded graphml file with python2.x. The "strings" hd and mh are
Python unicode types.
import networkx as nx
hd='H' + unichr(252) + 'sker D' + unichr(252)
mh='Mot' + unichr(246) + 'rhead'
G=nx.Graph()
G.add_edge(hd,mh)
nx.write_graphml(G,'test.graphml',encoding='utf-8')
Aric
For us to help you'll need to post a working short example code that
demonstrates the problem. You might have to do a little work to
isolate which nodes or edges are causing the error.
Aric
That name data doesn't look correctly encoded in my email. And I get
an error when I run your program.
It's likely you are not reading the data file with the correct
encoding. Note that you need to decode from whatever encoding you are
using in the data file when you read it into Python.
Aric