GraphKernels icon indicating copy to clipboard operation
GraphKernels copied to clipboard

CalculateVertexHistKernel(): NameError: name 'gs' is not defined

Open Mapabin opened this issue 5 years ago • 7 comments

Hello,

I've created a list of directed igraphs with several attributes for each vertex. Applying the CalculateVertexHistKernel - function, I receive the following error:

Traceback (most recent call last): K = gk.CalculateVertexHistKernel(data1) File "/usr/local/lib/python3.7/site-packages/graphkernels/kernels.py", line 42, in CalculateVertexHistKernel E, V_label, V_count, E_count, D_max = GetGKInput(G) File "/usr/local/lib/python3.7/site-packages/graphkernels/utilities.py", line 79, in GetGKInput g_info = GetGraphInfo(G[i]) File "/usr/local/lib/python3.7/site-packages/graphkernels/utilities.py", line 51, in GetGraphInfo v_attr_name = gs.vs.attributes()[0] NameError: name 'gs' is not defined

Thanks in advance.

Mapabin avatar Oct 25 '18 09:10 Mapabin

going to '/usr/local/lib/python3.7/site-packages/graphkernels/utilities.py’ and changing 'v_attr_name = gs.vs.attributes()[0]’ to 'v_attr_name = g.vs.attributes()[0]’ now created this error:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

Mapabin avatar Oct 25 '18 11:10 Mapabin

Using the pdb ....

/usr/local/lib/python3.7/site-packages/GKextCPy.py(78)_swig_getattr() -> if method: (Pdb) s /usr/local/lib/python3.7/site-packages/GKextCPy.py(80)_swig_getattr() -> raise AttributeError("'%s' object has no attribute '%s'" % (class_type.name, name)) (Pdb) s AttributeError: 'DoubleVector' object has no attribute 'this' /usr/local/lib/python3.7/site-packages/GKextCPy.py(80)_swig_getattr() -> raise AttributeError("'%s' object has no attribute '%s'" % (class_type.name, name))

Mapabin avatar Oct 25 '18 12:10 Mapabin

going to '/usr/local/lib/python3.7/site-packages/graphkernels/utilities.py’ and changing 'v_attr_name = gs.vs.attributes()[0]’ to 'v_attr_name = g.vs.attributes()[0]’ now created this error:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

have you fixed your problem?

tiankonghenlan20113046 avatar Nov 05 '19 07:11 tiankonghenlan20113046

Hi, I ran into this same problem using a different kernel function. It's due a simple typo in the source code in the GetGraphInfo() function in utilities that was fixed under commit 310a987f9b76b2cacda5a53e3bb6996c90a68669 but the pip package was never updated with this fix. The latest release for pip was before this fix. Could you update the pip package?

rebecafig avatar Aug 14 '21 15:08 rebecafig

Thanks for reporting this! I think @eghisu has the authorisation to update the packages. Could you update them please once, Elisabetta? We should then write about transferring the ownership to someone within MLCB.

Pseudomanifold avatar Aug 16 '21 06:08 Pseudomanifold

It seems like the package has still not been updated.

pimoens avatar Aug 12 '22 13:08 pimoens

I think the easiest way at this point is to build the package from source or use a different package, such as GraKeL.

Pseudomanifold avatar Aug 12 '22 14:08 Pseudomanifold