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.