Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gremlin script does not work unless graph is set to TinkerGraph, Titan.... #7

Closed
smunx opened this issue Jan 30, 2016 · 4 comments
Closed

Comments

@smunx
Copy link
Contributor

smunx commented Jan 30, 2016

Hi,
I tried running the following snippet.

`>>> import gremlinrestclient

client = gremlinrestclient.GremlinRestClient()
resp = client.execute(
... "graph.addVertex(label, p1, 'name', p2)",
... bindings={"p1": "person", "p2": "dave"})
resp
Response(status_code=200, data=[{u'properties': {u'name': [{u'id': 226, u'value': u'dave'}]}, u'type': u'vertex', u'id': 225, u'label': u'person'}], message={}, metadata=u'')`

But this only works for me if I set graph variable to TinkerGraph.open()

>>> resp = client.execute( ... "graph = TinkerGraph.open(); graph.addVertex(label, p1, 'name', p2)", ... bindings={"p1": "person", "p2": "dave"})

And this is same for remaining functions.

@davebshow
Copy link
Owner

Well, I'm not really sure. I just tried this using using apache-gremlin-server-3.1.0-incubating with conf/gremlin-server-rest.yaml and it worked without any special configuration.

What version of the Gremlin Server are you using? What configuration?

@smunx
Copy link
Contributor Author

smunx commented Jan 30, 2016

I tired 3.0.0 and also 3.1.0. Yes I also used the same conf file.
I just started working with graph databases and gremlin.

I used the following command to start the gremlin server

tinkerpop-3.1.0-incubating/gremlin-server/target/apache-gremlin-server-3.1.0-incubating-standalone/bin$ ./gremlin-server.sh ../conf/gremlin-server-rest-modern.yaml

@smunx
Copy link
Contributor Author

smunx commented Jan 30, 2016

I solved the problem.
I was starting the gremlin server from the bin folder. Instead it should be started from the root
$cd apache-gremlin-server-3.1.0-incubating-standalone

$bin/gremlin-server.sh conf/gremlin-server-rest-modern.yaml

@davebshow
Copy link
Owner

Great! I'll mark this as closed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants