I'd like to repeat a bit of a traversal in gremlin, like this:
g.V(1).repeat(out()).times(1)
using the goblin
package for python, and the default titan11
install (which is, I think, titan+casssandra+gremlin+elasticsearch but, well, this stuff is confusing).
In python I write more or less the exact same thing as above, after doing some special imports:
from gremlin_python import statics
from gremlin_python.process.graph_traversal import __
statics.load_statics(globals())
# ... lots of other badass async python stuff and some networkx stuff etc
sg = g.V(seed_id).repeat(out()).times(1)
(see https://github.com/mikedewar/graphLearning/blob/master/conditional_traversal.py#L107 for all the other bits and bobs if you think it might help)
When I iterate over the sg
traversal using goblin I get a Java error from, I think, gremlin:
goblin.exception.GremlinServerError: 597: No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.times() is applicable for argument types: (java.lang.Long) values: [1]
Possible solutions: toSet(), size(), min(), take(int), sleep(long), is(java.lang.Object)
So I think maybe it doesn't like the integer I pass to it.
Please help! I'd like to be able to repeat stuff in gremlin.