jacquesfize / GMatch4py

A graph matching library for Python
MIT License
192 stars 41 forks source link

Bug with GMatch4py if start with an other example #24

Open pkrezel opened 3 years ago

pkrezel commented 3 years ago

Hi, I noticed that if I don't begin with the examples given in your document, GMatch4py fails and gives: _


TypeError Traceback (most recent call last)

in ----> 1 result=ged.compare([Gx1, Gx2, Gx3],None) 2 print(result) gmatch4py/ged/abstract_graph_edit_dist.pyx in gmatch4py.ged.abstract_graph_edit_dist.AbstractGraphEditDistance.compare() gmatch4py/ged/abstract_graph_edit_dist.pyx in gmatch4py.ged.abstract_graph_edit_dist.AbstractGraphEditDistance.compare() gmatch4py/helpers/general.pyx in gmatch4py.helpers.general.parsenx2graph() gmatch4py/graph.pyx in gmatch4py.graph.Graph.__init__() TypeError: Expected str, got int

_

If I begin with your example and do the same thing it works!

jacquesfize commented 3 years ago

Hi @pkrezel,

Can you show me a sample of your graphs ?

Best, @Jacobe2169

pkrezel commented 3 years ago

Hi, I attached a pickle containing the list of networkx graphs. can you read it ? [ LGx.zip

](url)

pkrezel commented 3 years ago

Hi, it seems that the problem is linked with the definition of the attributes to be used: ged.set_attr_graph_used("color", "weight")

I attached the new pickle with graphs containing "weight" as attribute. LGx.zip

pkrezel commented 3 years ago

Hi, I think it is a mistake coming from me. In my case, I don't have to worry with "ged.set_attr_graph_used" because I want to use all the elements of the graph.

Best.