You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2018/02/20 20:30:00 UTC

[jira] [Commented] (TINKERPOP-1895) gremlin-python lambdas do not work with HaltedTraverserStrategy(DetachedFactory)

    [ https://issues.apache.org/jira/browse/TINKERPOP-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16370575#comment-16370575 ] 

stephen mallette commented on TINKERPOP-1895:
---------------------------------------------

I don't think you need to use {{HaltedTraverserStrategy}} this way if you are on 3.3.1. Note that it's already configured on the server for you:

{code}
gremlin> g = EmptyGraph.instance().traversal().withRemote('conf/remote-graph.properties')
==>graphtraversalsource[emptygraph[empty], standard]
gremlin> g.V()
gremlin> v = g.addV('person').property('a',123).next()
==>v[0]
gremlin> v.label
==>person
gremlin> v.properties()
{code}

That doesn't mean that how this is currently working is ok - we'll need to look at what's happening when you try to add the strategy.

> gremlin-python lambdas do not work with HaltedTraverserStrategy(DetachedFactory)
> --------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1895
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1895
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 3.3.1
>            Reporter: Branden Moore
>            Priority: Major
>
> When using the HaltedTraverserStrategy(o.a.t.g.s.u.d.DetachedFactory) in gremlin-python, lambdas cannot be processed, returning a Python NameError.
> Using the examples from the documentation, against gremlin-server-modern-py.yaml
>  
>  g.V().out().map(lambda: "x: len(x.get().value('name'))").sum().toList()
> [24L]
> g.withStrategies(HaltedTraverserStrategy("org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory")).V().out().map(lambda: "x: len(x.get().value('name'))").sum().toList()
> GremlinServerError: 599: NameError: name 'TraversalStrategy' is not defined in <script> at line number 1



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)