Kelvin R. Lawrence created TINKERPOP-2188:
---------------------------------------------
Summary: PartitionStrategy from Python causes a 599 GremlinServer
error
Key: TINKERPOP-2188
URL: https://issues.apache.org/jira/browse/TINKERPOP-2188
Project: TinkerPop
Issue Type: Bug
Components: python
Affects Versions: 3.4.1
Environment: Linux client, Python 3, pip install of gremlinpython 3.4.1
Reporter: Kelvin R. Lawrence
Using the code snippet below to any GremlinServer running even an empty
TinkerGraph causes GremlinServer to fail with a 599 error. I assume as this is
a decoration strategy that the client side Python is generating something
invalid. I could not find any coverage for PartitionStrategy in the strategy
test cases for the Python client. Maybe I missed them but did not find any. I
opened this against 3.4.1 but I have not tried to use this strategy from Python
before so not sure if it worked previously.
{code:java}
from gremlin_python.driver.driver_remote_connection import
DriverRemoteConnection
from gremlin_python.structure.graph import Graph
from gremlin_python import statics
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.process.traversal import *
from gremlin_python.process.anonymous_traversal import traversal
import sys
endpoint = 'ws://localhost:8182/gremlin'
graph=Graph()
connection = DriverRemoteConnection(endpoint,'g')
g = traversal().withRemote(connection)
g2 =
g.withStrategies(PartitionStrategy(partition_key="partition",write_partition="a",
read_partitions="a"))
try:
x = g2.addV('test').property("p1",1).toList()
except:
print("Exception trying to add a vertex")
print(sys.exc_info())
finally:
connection.close(){code}
When run the code above will generate this error:
{code:java}
Exception trying to add a vertex
(<class 'gremlin_python.driver.protocol.GremlinServerError'>,
GremlinServerError('599: None',), <traceback object at 0x7f723781ff88>)
connection.close(){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)