0

in my script I do the following:
eval("query")
and get:
unexpected EOF while parsing (<string>, line 1)

in Jupyter i do:
query
and get:

GremlinServerError: 499: {"requestId":"2602387d-f9a1-4478-a90d-3612d1943b71","code":"ConstraintViolationException","detailedMessage":"Vertex with id already exists: ba48297665fc3da684627c0fcb3bb1fd6738e7ad8eb8768528123904b240aaa7b21f66624de1fea84c87e5e2707995fe52435f1fb5fc4c2f9eaf85a605c6877a"}

Is there a way to preserve the detailed error message whilst doing Gremlin queries with the eval("querystring") approach?
I need to concatenate many strings into one query, that is why.
Also, the detailed error message allows me to catch the errors like this ConstraintViolationException

Details:
I am interacting with Neptune with Python.
I have this at the beginning of my script:
from gremlin_python import statics
statics.load_statics(globals())
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
which is from the official documentation on how to connect with Python.

cryanbhu
  • 4,780
  • 6
  • 29
  • 47
  • Can you share more details around how you are interacting with Neptune in both cases? unexpected EOF while parsing (, line 1) looks like a malformed request. – The-Big-K Oct 24 '18 at 06:50
  • @KarthikRajan I have updated with details on how I am importing and interacting with Neptune using `gremlin_python` – cryanbhu Oct 26 '18 at 01:09

1 Answers1

0

There is insufficient info in the question to provide a good answer for this one. There should be no difference in the error message you see between a client program and Jupyter notebook, as long as you're using the exact same code. From your messages, I suspect that there is a difference in either the serializer or the protocol (websocket vs HTTP) between your experiments. The response formats (and possibly the error formats too) different between serializers and protocol, so thats probably where you should start looking.

The-Big-K
  • 2,672
  • 16
  • 35