GMatch4py icon indicating copy to clipboard operation
GMatch4py copied to clipboard

Bug with GMatch4py if start with an other example

Open pkrezel opened this issue 4 years ago • 4 comments

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!

pkrezel avatar Nov 20 '20 07:11 pkrezel

Hi @pkrezel,

Can you show me a sample of your graphs ?

Best, @Jacobe2169

jacquesfize avatar Nov 20 '20 09:11 jacquesfize

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

](url)

pkrezel avatar Nov 20 '20 10:11 pkrezel

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 avatar Nov 20 '20 10:11 pkrezel

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.

pkrezel avatar Nov 20 '20 10:11 pkrezel