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

_add_edge and MultiDiGraph parameters #4

Open
ghost opened this issue Jan 25, 2019 · 0 comments
Open

_add_edge and MultiDiGraph parameters #4

ghost opened this issue Jan 25, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 25, 2019

Hello,

I may be missing something here - but there seems to be an issue with https://github.com/davebshow/ipython-gremlin/blob/master/gremlin/resultset.py#L169 and the current version of networkx. I get the following error message:

 /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/ipython_gremlin-1.0.0-py3.5.egg/gremlin/resultset.py in _add_vertex(self, v)
     167 
     168     def _add_vertex(self, v):
 --> 169         self._graph.add_node(v.id, {'label': v.label})
     170 
     171     def _add_edge(self, e):
 
 TypeError: add_node() takes 2 positional arguments but 3 were given

Changing it to the following seems to resolve the error:

self._graph.add_node(v.id, label=v.label)

https://networkx.github.io/documentation/latest/reference/classes/generated/networkx.MultiDiGraph.add_node.html

dcwangmit01 added a commit to dcwangmit01/ipython-gremlin that referenced this issue Sep 8, 2020
* Described here:
  davebshow#4
* Error may be invoked by calling .get_graph()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants