Does graph notebook still work after changes to serializers?

I am trying to use the graph-notebook project, my project previously worked. I updated Aerospike graph to the latest version of tinkerpop and with it the serializers were updated. Trying to run any %%gremlin now results in an error of
[WARN] o.a.t.g.s.h.WsGremlinBinaryRequestDecoder - Gremlin Server is not configured with a serializer for the requested mime type [application/vnd.gremlin-v3.0+json] - using org.apache.tinkerpop.gremlin.util.ser.GraphBinaryMessageSerializerV1 by default
[WARN] o.a.t.g.s.h.WsGremlinBinaryRequestDecoder - Serialization error while decoding request
org.apache.tinkerpop.gremlin.util.ser.SerializationException: The most significant bit should be set according to the format
at org.apache.tinkerpop.gremlin.util.ser.binary.RequestMessageSerializer.readValue(RequestMessageSerializer.java:45)
[WARN] o.a.t.g.s.h.WsGremlinBinaryRequestDecoder - Gremlin Server is not configured with a serializer for the requested mime type [application/vnd.gremlin-v3.0+json] - using org.apache.tinkerpop.gremlin.util.ser.GraphBinaryMessageSerializerV1 by default
[WARN] o.a.t.g.s.h.WsGremlinBinaryRequestDecoder - Serialization error while decoding request
org.apache.tinkerpop.gremlin.util.ser.SerializationException: The most significant bit should be set according to the format
at org.apache.tinkerpop.gremlin.util.ser.binary.RequestMessageSerializer.readValue(RequestMessageSerializer.java:45)
which is a mismatch on the serializer. I can't seem to find a way to change the serializer in this magic cell. Is there a workaround for this?
Solution:
GitHub
[BUG] Seems like this is broken when used against latest tinkerpop ...
I am trying to use the graph-notebook project, my project previously worked. I updated Aerospike graph to the latest version of tinkerpop and with it the serializers were updated. Trying to run any...
Jump to solution
11 Replies
Solution
Lyndon
Lyndon•12mo ago
GitHub
[BUG] Seems like this is broken when used against latest tinkerpop ...
I am trying to use the graph-notebook project, my project previously worked. I updated Aerospike graph to the latest version of tinkerpop and with it the serializers were updated. Trying to run any...
kelvinl2816
kelvinl2816•12mo ago
Hi @Lyndon Bauto - the Graph Notebook pre-selects the GraphSONV3 serializer as there used to be issues with Gremlin Python not supporting all of GraphBinary (and a few other things). This is really uncanny timing but we have a PR in the works to lift that restriction and make it configurable. And actually for your Graph you can override it using the %%graph_notrbook_config magic The restriction was only enforced for Neptune
Lyndon
LyndonOP•12mo ago
Yeah - michael on the graph-notebook project helped me by giving me
%%graph_notebook_config
{
"host": "localhost",
"port": 8182,
"ssl": false,
"gremlin": {
"message_serializer": "graphbinary"
}
}
%%graph_notebook_config
{
"host": "localhost",
"port": 8182,
"ssl": false,
"gremlin": {
"message_serializer": "graphbinary"
}
}
Which works - I guess the name changes to the serializers broke compatibility here when using server 3.7.0+ Thanks Kelvin
kelvinl2816
kelvinl2816•12mo ago
Yeah that's the one. Cool. We have a PR (I just approved it actually) to allow that to work for Neptune also. But for your server it should work without that PR. Does your server have a GraphSON serializer installed? That message implies it didn't have one.
Yang Xia
Yang Xia•12mo ago
Just to jump in, notebook currently uses 3.6.x driver, and we had serializer package changes and renaming in 3.7.x, so this error would be expected if you are using notebook to connect to a 3.7 server (since we don't guarantee compatibility between 3.6 and 3.7). We will need notebook to be using 3.7.x driver to fully avoid the error Actually I might spoken too fast on the nature of the specific error, but the changed package in 3.7.x might have an affect
kelvinl2816
kelvinl2816•12mo ago
The error is the one you typically get when the server does not have a GraphSON serializer enabled. That said, the 3.7 changes, as you describe, could be problematic for the graph-notebook Notebooks, as they try to support as many Gremlin Server versions as possible. Of course the notebook user can always update their Gremlin Python version on top of an installed NB if they need to.
Yang Xia
Yang Xia•12mo ago
Okay yea, that makes sense. I've had some problems with the serializer package change that it's the first thing I think of when I see related errors 😅 .
Lyndon
LyndonOP•12mo ago
We do have GraphSON and it worked before we updated tinkerpop to 3.7.0. I think it's just the changing of the serializer name thing in the 3.7.0 making a mismatch, but it's hard to say 100% Side note - is gremlin-python installed in the graph-notebook? I tried installing different versions of it in the docker container I was running the notebook in but it did not change anything
kelvinl2816
kelvinl2816•12mo ago
graph-notebook installs Gremlin Python 3.6.2 I believe
triggan
triggan•12mo ago
And I think it has to be installed in the conda environment used by the notebooks - not the general python library path. So just doing a pip install in the container wouldn't be enough.
Name: gremlinpython
Version: 3.6.2
Summary: Gremlin-Python for Apache TinkerPop
Home-page: http://tinkerpop.apache.org
Author:
Author-email:
License: Apache 2
Location: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages
Requires: aenum, aiohttp, isodate, nest-asyncio
Required-by: awswrangler, graph-notebook
Note: you may need to restart the kernel to use updated packages.
Name: gremlinpython
Version: 3.6.2
Summary: Gremlin-Python for Apache TinkerPop
Home-page: http://tinkerpop.apache.org
Author:
Author-email:
License: Apache 2
Location: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages
Requires: aenum, aiohttp, isodate, nest-asyncio
Required-by: awswrangler, graph-notebook
Note: you may need to restart the kernel to use updated packages.
Note the path above.
Lyndon
LyndonOP•12mo ago
ah makes sense
Want results from more Discord servers?
Add your server