Can't do explain() traversal step using Gremlin-Python ..

Hi I just started messing around in gremlin-python this week, so likely to be doing something wrong with g, but as mentioned on twitch, I'm unable to add an explain() step to one of my first traversals. i start with g a connected graphTraversalSource and perform the following
vertex = g.add_v("my_vertex").next()
vertex = (
g.V(vertex)
.property("~supernode", True)
.property("foo", "bar")
.property("baz", "biz")
.explain()
.next()
)
vertex = g.add_v("my_vertex").next()
vertex = (
g.V(vertex)
.property("~supernode", True)
.property("foo", "bar")
.property("baz", "biz")
.explain()
.next()
)
when the explain step is reached (or added in as this behaves fine without explian), i get the following error:
TypeError: 'GraphTraversal' object is not callable
TypeError: 'GraphTraversal' object is not callable
so i try removing the parens after explain, but that only puts [values explain] at the end of the traversal if i change explain to a step that certainly does not exist (foobar) and get the same error trying without next / substituting next for value_map or something has no effect.. if i search my local installation of gremlin python (recently updated from 3.6.4 to 3.7) i get no results..
λ cd ~/.local/lib/python3.10/site-packages/gremlin_python ; grep -rn explain .
λ
λ cd ~/.local/lib/python3.10/site-packages/gremlin_python ; grep -rn explain .
λ
4 Replies
nathimble_07451
nathimble_0745115mo ago
update -- didnt see this ( https://discord.com/channels/838910279550238720/1065371371049324657/1139273135124914196) while i was drafting up the question is currently missing but should be resolved in next release TYSM!
spmallette
spmallette15mo ago
looks like we still have a gap from Java here. there is an existing issue: https://issues.apache.org/jira/browse/TINKERPOP-2128 guess no one ever came back to fix this issue - cc/ @colegreer
ColeGreer
ColeGreer15mo ago
Ahh I just spent half an hour going down the rabbit hole of "discovering" that explain() doesn't work in any remote traversal regardless of the driver. I guess that's what I get for not checking discord earlier. I will update that old issue with some new details.
spmallette
spmallette15mo ago
that should be fixed. that stinks. i guess you can still do explain() with submit(String) of course, most folks don't typically explain() in their code that's a thing you do in Gremlin Console when you're developing your Gremln i suppose you could be using python repl or something though and want to do it there
Want results from more Discord servers?
Add your server