tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kaiser-Cross (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (TINKERPOP-2346) In gremlin python, error when using 'valueMap' and 'with_' combined
Date Mon, 02 Mar 2020 16:16:00 GMT

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

Michael Kaiser-Cross edited comment on TINKERPOP-2346 at 3/2/20 4:15 PM:
-------------------------------------------------------------------------

For connecting via python create a file load.py that looks like this:

load.py

 
{noformat}
from gremlin_python import statics
from gremlin_python.process.anonymous_traversal import traversal
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.driver.client import Client
from gremlin_python.process.traversal import T
from gremlin_python.process.traversal import Order
from gremlin_python.process.traversal import Cardinality
from gremlin_python.process.traversal import Column
from gremlin_python.process.traversal import Direction
from gremlin_python.process.traversal import Operator
from gremlin_python.process.traversal import P
from gremlin_python.process.traversal import Pop
from gremlin_python.process.traversal import Scope
from gremlin_python.process.traversal import Barrier
from gremlin_python.process.traversal import Bindings
from gremlin_python.process.traversal import WithOptions

g = None
try:
    g = traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
except:
    print("Could not connect to local gremlin")
{noformat}
 

 

Then run:
{noformat}
python -i load.py{noformat}
 

You should then be able to run the original query in the interactive python prompt. Thanks.

 


was (Author: mkaisercross):
For connecting via python create a file load.py that looks like this:

load.py

 
{noformat}
from gremlin_python import statics
from gremlin_python.process.anonymous_traversal import traversal
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.driver.client import Client
from gremlin_python.process.traversal import T
from gremlin_python.process.traversal import Order
from gremlin_python.process.traversal import Cardinality
from gremlin_python.process.traversal import Column
from gremlin_python.process.traversal import Direction
from gremlin_python.process.traversal import Operator
from gremlin_python.process.traversal import P
from gremlin_python.process.traversal import Pop
from gremlin_python.process.traversal import Scope
from gremlin_python.process.traversal import Barrier
from gremlin_python.process.traversal import Bindings
from gremlin_python.process.traversal import WithOptionsg = None
try:
    g = traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
except:
    print("Could not connect to local gremlin")
{noformat}
 

 

Then run:
{noformat}
python -i load.py{noformat}
 

You should then be able to run the original query in the interactive python prompt. Thanks.

 

> In gremlin python, error when using 'valueMap' and 'with_' combined
> -------------------------------------------------------------------
>
>                 Key: TINKERPOP-2346
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2346
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 3.4.5
>            Reporter: Michael Kaiser-Cross
>            Priority: Major
>
> Simple example that demonstrates issue.
> >>> g.V().valueMap().with_(WithOptions.ids).toList()
>  
> gremlin_python.driver.protocol.GremlinServerError: 599: Could not locate method: DefaultGraphTraversal.with([1])
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message