Hugo Arts created TINKERPOP-1811:
------------------------------------
Summary: Improve error reporting for serialization errors between
gremlin-python and gremlin-server
Key: TINKERPOP-1811
URL: https://issues.apache.org/jira/browse/TINKERPOP-1811
Project: TinkerPop
Issue Type: Improvement
Components: python, server
Affects Versions: 3.2.6
Reporter: Hugo Arts
Priority: Minor
We ran into an issue while attempting to add a PartitionStrategy to our
traversals. This is a small example of a traversal I tried:
{code:none}
remote = DriverRemoteConnection('ws://localhost:8182/gremlin',
'DSE_GRAPH_QUICKSTART.g')
strategy = PartitionStrategy('community_id', '2097442560', 2097442560)
g = Graph().traversal().withRemote(remote).withStrategies(strategy)
print(g.V().toList())
{code}
The third argument of PartitionStrategy should be a list. However, the
traversal strategies in gremlin-python do not do any kind of argument/type
checking, and any mistake you make results in the following error from gremlin
server:
{noformat}
ERROR [gremlin-server-worker-1] 2017-10-25 10:15:53,285 GREMLIN
TraversalOpProcessor.java:365 - Could not deserialize the Traversal instance
{noformat}
I've omitted the [full
traceback|https://gist.github.com/anonymous/2ad6541d0169256afb1a23fbdc376009]
for brevity. There is not much indication as to what has gone wrong.
gremlin-python gives this error:
{noformat}
gremlin_python.driver.protocol.GremlinServerError: 599: None
{noformat}
Which is also unhelpful. We were eventually able to figure out what we were
doing wrong, but it would be very nice to have either some input validation on
the gremlin-python side, or have gremlin-server be more specific about the
nature of the deserialisation error (or both).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)