GraphKernels
GraphKernels copied to clipboard
CalculateVertexHistKernel(): NameError: name 'gs' is not defined
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.
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)
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))
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?
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?
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.
It seems like the package has still not been updated.
I think the easiest way at this point is to build the package from source or use a different package, such as GraKeL.