Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mapabin opened this issue Oct 25, 2018 · 7 comments
Open

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

Mapabin opened this issue Oct 25, 2018 · 7 comments

Comments

@Mapabin
Copy link

Mapabin commented Oct 25, 2018

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
Copy link
Author

Mapabin commented Oct 25, 2018

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
Copy link
Author

Mapabin commented Oct 25, 2018

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))

@tiankonghenlan20113046
Copy link

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?

@rebecafig
Copy link

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 310a987 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?

@Pseudomanifold
Copy link
Contributor

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.

@pimoens
Copy link

pimoens commented Aug 12, 2022

It seems like the package has still not been updated.

@Pseudomanifold
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants