davebshow / ipython-gremlin

http://ipython-gremlin.readthedocs.org/en/latest/
MIT License
42 stars 8 forks source link

Not working with Gremlins 3.3.3 #2

Open cscetbon opened 6 years ago

cscetbon commented 6 years ago

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]: []
cscetbon commented 6 years ago

I also tried installing your package directly from GitHub and this time, I don't see anymore errors in Gremlins logs but I get a warning in ipython :

In [4]: %gremlin g.V()
/opt/conda/lib/python3.6/site-packages/aiogremlin/driver/aiohttp/transport.py:22: RuntimeWarning: coroutine 'ClientWebSocketResponse.send_bytes' was never awaited
  self._ws.send_bytes(message)
davebshow commented 6 years ago

Try installing aiogremlin from github. This error has to do with changes made in the aiohttp websocket client. Iā€™m travelling now, but I hope to update all of these libraries soon.

On Fri, Jun 22, 2018 at 10:28 AM Cyril Scetbon notifications@github.com wrote:

I also tried installing your package directly from GitHub and this time, I don't see anymore errors in Gremlins logs but I get a warning in ipython :

In [4]: %gremlin g.V() /opt/conda/lib/python3.6/site-packages/aiogremlin/driver/aiohttp/transport.py:22: RuntimeWarning: coroutine 'ClientWebSocketResponse.send_bytes' was never awaited self._ws.send_bytes(message)

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/davebshow/ipython-gremlin/issues/2#issuecomment-399461697, or mute the thread https://github.com/notifications/unsubscribe-auth/ADj62ShFBmJtbNB_i0Fn_il9ZTsZ_q4Sks5t_P8egaJpZM4Uz3zN .

-- David M. Brown R.A. CulturePlex Lab, Western University

cscetbon commented 6 years ago

@davebshow, now I get another error : org.apache.tinkerpop.gremlin.server.op.OpProcessorException: The [eval] message contains 19 bindings which is more than is allowed by the server 16 configuration

The full log can be found at https://pastebin.com/raw/JL7PQC6W

davebshow commented 6 years ago

You can increase the number of bindings in the gremlin server config file. But this is more of a hack then a fix. I need to figure out to better handle this in the next release.

On Fri, Jun 22, 2018 at 11:15 AM Cyril Scetbon notifications@github.com wrote:

@davebshow https://github.com/davebshow, now I get another error : org.apache.tinkerpop.gremlin.server.op.OpProcessorException: The [eval] message contains 19 bindings which is more than is allowed by the server 16 configuration

The full log can be found at https://pastebin.com/raw/JL7PQC6W

ā€” You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/davebshow/ipython-gremlin/issues/2#issuecomment-399476912, or mute the thread https://github.com/notifications/unsubscribe-auth/ADj62YhngtvkH52S4Al_rhFLQhi8-EGzks5t_QoBgaJpZM4Uz3zN .

-- David M. Brown R.A. CulturePlex Lab, Western University

cscetbon commented 6 years ago

Okay thanks @davebshow, I'll wait for a fix then šŸ˜‰

cscetbon commented 6 years ago

@davebshow do you think you'll have a fix soon ? I'd like to present something using your interpreter in the next few days.

davebshow commented 6 years ago

TBH no. I am not sure what the best approach to solve this while still allowing bound Ipython variables to be passed as bindings. I am overwhelmed now with other work, and unfortunately these libraries are now community only with no official backing. The current solution is to increase the number of allowed bindings in the server configuration. I would love to hear ideas for better approaches though, and I am happy to accept PRs etc.

The config would have this line in the processors config:

  - { className: org.apache.tinkerpop.gremlin.server.op.standard.StandardOpProcessor, config: { maxParameters: 64 }}
iPrithvi commented 6 years ago

Hi @davebshow ,

I am currently using this library to access graph on AWS Neptune and visualize. But, facing the same issue as @cscetbon with bindings.

Error

The [eval] message contains 25 bindings which is more than is allowed by the server 16 configuration

Please let me know where is the configuration file that I need to modify and which parameter to tune for overcoming this issue.

Best Regards, iPrithvi

cscetbon commented 4 years ago

@iPrithvi did you find another way ? it's been like a year and a half ...