rpuga
rpuga
JJanusGraph
Created by rpuga on 11/17/2023 in #questions
Unable to use next() in gremlin-python
Update: the Java solution also worked, thank you very much!
14 replies
JJanusGraph
Created by rpuga on 11/17/2023 in #questions
Unable to use next() in gremlin-python
Thank you for the examples, they are very useful! I used your .yaml file, and now gremlin-python works. Earlier, I forgot to specify the serializer. I added the following and now it works OK:
message_serializer = serializer.GraphSONSerializersV3d0()
connection = DriverRemoteConnection("ws://jgserver:8182/gremlin", "g", message_serializer=message_serializer)
message_serializer = serializer.GraphSONSerializersV3d0()
connection = DriverRemoteConnection("ws://jgserver:8182/gremlin", "g", message_serializer=message_serializer)
I'll try your solution for the Java code as well. Thanks!
14 replies
JJanusGraph
Created by rpuga on 11/17/2023 in #questions
Unable to use next() in gremlin-python
Hi, yes, here is the yaml file is attached. And here is the error:
[...]
File "/var/lib/janusgraph/.local/lib/python3.10/site-packages/gremlin_python/driver/connection.py", line 90, in _receive
status_code = self._protocol.data_received(data, self._results)
File "/var/lib/janusgraph/.local/lib/python3.10/site-packages/gremlin_python/driver/protocol.py", line 138, in data_received
raise GremlinServerError(message['status'])
gremlin_python.driver.protocol.GremlinServerError: 599: Error during serialization: Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
[...]
File "/var/lib/janusgraph/.local/lib/python3.10/site-packages/gremlin_python/driver/connection.py", line 90, in _receive
status_code = self._protocol.data_received(data, self._results)
File "/var/lib/janusgraph/.local/lib/python3.10/site-packages/gremlin_python/driver/protocol.py", line 138, in data_received
raise GremlinServerError(message['status'])
gremlin_python.driver.protocol.GremlinServerError: 599: Error during serialization: Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
BTW: When I enable the GraphSONMessageSerializerV3 serializer in the yaml config file, I also get the same error from a Java app that connects to JanusGraph (my Java app works fine with the default serializer):
java.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Error during serialization: Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044)
at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:123)
at org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:175)
at com.example.GremlinJavaExample.main(GremlinJavaExample.java:49)
java.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Error during serialization: Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044)
at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:123)
at org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:175)
at com.example.GremlinJavaExample.main(GremlinJavaExample.java:49)
14 replies
JJanusGraph
Created by rpuga on 11/17/2023 in #questions
Unable to use next() in gremlin-python
Thanks for the suggestion. Unfortunately, after setting the serializer to GraphSONMessageSerializerV3 I get the following error 😦
GremlinServerError: 599: Error during serialization: Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
GremlinServerError: 599: Error during serialization: Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
14 replies
JJanusGraph
Created by rpuga on 11/17/2023 in #questions
Unable to use next() in gremlin-python
Also, g.V().count().next() works, but g.V().next() yields the same KeyError
14 replies