Closed remi-sap closed 5 years ago
Hi @remi-sap
from client side you cannot chose the database to use. You can only chose the traversal source in your case g
which is binded to an OrientDB database configured in ${ORIENTDB_HOME}/config/gremlin-server.yaml
from gremlin_python.process.anonymous_traversal import traversal
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
username="root"
password="rootpwd"
host="localhost"
port=8182
url="ws://"+host+":"+str(port)+"/gremlin"
print("Connecting to gremlin server at: ", url)
g = traversal().withRemote(
DriverRemoteConnection(url=url, traversal_source='g', username=username, password=password))
g.V().count()
and also the ws
url should contain gremlin
Let me know if this helps
Thanks
Hello, With the orientdb tinkerpop3 docker image the database is demodb.
I logged on with the studio and created a few vertices. Then the following python sample worked:
from gremlin_python.driver import client
username="root"
password="rootpwd"
host="localhost"
port=8182
url="ws://"+host+":"+str(port)+"/gremlin"
print("Connecting to gremlin server at: ", url)
g= client.Client(url=url, traversal_source='g', username=username, password=password)
query = "g.V().label()"
print(g.submit(query).next())
Hi, I'm trying to connect with the generic package gremlin_python. Is it possible ?
I'm using the docker image for ODB + gremlin
Then I install package gremlin_python and I execute
This throws an exception
tornado.httpclient.HTTPError: HTTP 599: Stream closed
I get the same exception if I put a wrong username, password or database name.The failed attempts are logged:
Any pointers ?
Thanks.