My first post here so I start by a big Thank you to the all community of people around gephi and libgexf, you work rocks !
So I am starting to use libgexf through th python bindings.
I do have some nodes label which are unicode strings containing french accents.
When I try a
Code: Select all
data.setNodeLabel("id",myUnicodeString)
Ok now if I do this :Traceback (most recent call last):
Traceback (most recent call last):
File "sqlToGexf.py", line 61, in ?
data.setNodeLabel(str(idNode),topic)
File "libgexf.py", line 776, in setNodeLabel
def setNodeLabel(self, *args): return _libgexf.Data_setNodeLabel(self, *args)
TypeError: in method 'Data_setNodeLabel', argument 3 of type 'std::string const &'
Code: Select all
data.setLabel("id",str(myUnicodeString))
Of course I could get rid of accents but well I first want to be sure there's no way to keep my dear french accents ?Traceback (most recent call last):
File "sqlToGexf.py", line 61, in ?
data.setNodeLabel(str(idNode),str(topic))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 2: ordinal not in range(128)
thank for your help
Paul
ps: I don't understand the difference between data.setLabel() and data.setNodeLabel()
the first one doesn't accept id, string as parameters... ?