jms.
jms.
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
okay. so i started the gremlin server with the modern locally -- for example the output log for the server shows:
[INFO] o.a.t.g.s.u.ServerGremlinExecutor - A GraphTraversalSource is now bound to [g] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
[INFO] o.a.t.g.s.u.ServerGremlinExecutor - A GraphTraversalSource is now bound to [g] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
i then opened the console and used
remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182
remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182
using the following g.V().values('name') i get
No signature of method: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph.V() is applicable for argument types: () values: []
No signature of method: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph.V() is applicable for argument types: () values: []
should i see some sort of log output on the server showing a connected traversal?
56 replies
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
maybe how i'm using .next() poking around when i don't use .next() i don't get the g alias as g error. i'll keep reading through the docs. i think i'm at a "user error" state. 😉 thanks again for all the help thus far. i really appreciate it!
56 replies
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
update. i grabbed the most recent version 3.7 of server and it loaded without issue -- i see the output for A GraphTraversalSource is now bound to [g]. now back to the code. i still seem to get the error with my python code: '{'requestId': '18abc62e-ee3a-471d-8614-0dad21772789', 'status': {'code': 499, 'message': 'The traversal source [g] for alias [g] is not configured on the server.', 'attributes': {}}, 'result': {'meta': {}, 'data': None}}' i appreciate the help!
56 replies
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
java --version gets me :
openjdk 17.0.13 2024-10-15
OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.13+0, mixed mode, sharing)
openjdk 17.0.13 2024-10-15
OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.13+0, mixed mode, sharing)
my .zshrc includes:
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
i still get the same error. is there a way to check the java dependencies and update those?
56 replies
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
@spmallette okay -- good thinking because i was just starting the server in the background. when i use gremlin-server.sh console i do get a few errors with java files:
Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: java.util.concurrent.ExecutionException: BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 60
Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: java.util.concurrent.ExecutionException: BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 60
[WARN] ServerGremlinExecutor - Could not initialize gremlin-groovy GremlinScriptEngine as init script could not be evaluated
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine
[WARN] ServerGremlinExecutor - Could not initialize gremlin-groovy GremlinScriptEngine as init script could not be evaluated
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine
` AFAICT, the server does ultimately start but i do not see any context 'g' started.
56 replies
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
awesome. i’ll look there. thanks 🙏
56 replies
ATApache TinkerPop
Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
i'm trying to follow along here and keep getting
'The traversal source [g] for alias [g] is not configured on the server.
'The traversal source [g] for alias [g] is not configured on the server.
i am starting the gremlin server locally and then within my python script and creating the romote connection via:
graph = Graph()
gremlin_traversal = graph.traversal().with_remote(DriverRemoteConnection(f'ws://{self.host}:{self.port}/gremlin','g'))
graph = Graph()
gremlin_traversal = graph.traversal().with_remote(DriverRemoteConnection(f'ws://{self.host}:{self.port}/gremlin','g'))
i then try to insert a basic vertex via (where name is provided via user input)
v1 = self.gremlin_traversal.addV("player").property("name", name).next()
print(v1)
v1 = self.gremlin_traversal.addV("player").property("name", name).next()
print(v1)
resulting in
The traversal source [g] for alias [g] is not configured on the server.
The traversal source [g] for alias [g] is not configured on the server.
...super confused.
56 replies