© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Apache TinkerPopAT
Apache TinkerPop•3y ago•
8 replies
nathimble_07451

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
g
, but as mentioned on twitch, I'm unable to add an explain() step to one of my first traversals.
i start with
g
g
a connected
graphTraversalSource
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]
[values explain]
at the end of the traversal
if i change explain to a step that certainly does not exist (
foobar
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 .
λ 
Apache TinkerPop banner
Apache TinkerPopJoin
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,376Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using java/gremlin inside python with Jpype!
Apache TinkerPopATApache TinkerPop / questions
15mo ago
Gremlin traversal exceeded maximum compilation depth. Max: 400
Apache TinkerPopATApache TinkerPop / questions
9mo ago
Gremlin python MergeV update properties
Apache TinkerPopATApache TinkerPop / questions
13mo ago
Optimising python-gremlin for fastApi
Apache TinkerPopATApache TinkerPop / questions
2y ago