Giter VIP home page Giter VIP logo

ipython-gremlin's People

Contributors

davebshow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ipython-gremlin's Issues

Not working with Gremlins 3.3.3

Hey,

gremlinpython works well with this Gremlins version however I got issues with your package(ipython-gremlin==1.0.0). The following code does not return :

In [1]: %load_ext gremlin
In [2]: %gremlin.connection.set_current ws://gremlins:8182/gremlin
Alias-- gremlins --created for database at ws://gremlins:8182/gremlin
Now using connection at ws://gremlins:8182/gremlin
In [3]: %gremlin g.V()     <====== Stuck here

Here is what I can see in the gremlins server logs https://pastebin.com/raw/MQfxGpN0

The same code with gremlinpython does the job :

In [1]: from gremlin_python import statics
   ...: from gremlin_python.structure.graph import Graph
   ...: from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
   ...: statics.load_statics(globals())
   ...: graph = Graph()
   ...: g = graph.traversal().withRemote(DriverRemoteConnection('ws://gremlins:8182/gremlin','g'))

In [2]: g.V().toList()
Out[2]: []

SyntaxError: ensure_future = asyncio.async

I get this error when trying to execute this line:

%reload_ext gremlin
%matplotlib inline
  File "/Users/s/anaconda3/envs/py37/lib/python3.7/site-packages/aiohttp/helpers.py", line 30
    ensure_future = asyncio.async
                                ^
SyntaxError: invalid syntax

I am on python 3.7.4 and jupyter==1.0.0

Outdated dependencies

This lib enforces PyYAML 3.12 (current: 5.3.1) and ipython 5.3.0 (current 7.16.1). Please update ๐Ÿ™‚

_add_edge and MultiDiGraph parameters

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.