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

Python: Cannot create new attributes on node #172

Open
Rulasmur opened this issue Nov 2, 2017 · 3 comments
Open

Python: Cannot create new attributes on node #172

Rulasmur opened this issue Nov 2, 2017 · 3 comments

Comments

@Rulasmur
Copy link

Rulasmur commented Nov 2, 2017

When I attempt:
nde = g.addNode(label="Test",color=blue, size=5.0) nde.gender = "female"
I get the error:
Traceback (most recent call last): File "<input>", line 1, in <module> IllegalArgumentException: java.lang.IllegalArgumentException: The column 'gender' is not found

has the feature been removed or am I misunderstanding something?

@eduramiba
Copy link
Member

Mmm it's possible that you now need to add the column first, I will check it.

@xander2508
Copy link

Hey was this ever solved?

@brad-alexander
Copy link

found that you can add a column like so:

>>> n = iter(g.nodes).next() # get any node
>>> n.newcolumn = "yay"
Traceback (most recent call last):
  File "<input>", line 1, in <module>
IllegalArgumentException: java.lang.IllegalArgumentException: The column 'newcolumn' is not found
>>> import java
>>> n.node.table.addColumn("newcolumn", java.lang.String)
newcolumn (class java.lang.String)
>>> n.newcolumn = "yay"
>>>

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

4 participants