Phone-calls example incompatible with 1.5.2


#1

when I run the phone calls example (and my own code; keyspace=“ohio”) with 1.5.1 or 1.5.2 I get the following error … 1.5.0 works just fine

Any idea why this is the case?

“Traceback (most recent call last):
File “/Applications/anaconda3/lib/python3.7/site-packages/grakn/client.py”, line 63, in init
open_session_response = self._stub.open(RequestBuilder.open_session(keyspace))
File “/Applications/anaconda3/lib/python3.7/site-packages/grpc/_channel.py”, line 533, in call
return _end_unary_response_blocking(state, call, False, None)
File “/Applications/anaconda3/lib/python3.7/site-packages/grpc/_channel.py”, line 467, in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = “grakn.core.server.exception.TransactionException-Keyspace name is invalid: []. Keyspace name cannot start with a number, and can only contain maximum 48 characters of lower case, alphanumeric and underscore characters… Please check server logs for the stack trace.”
debug_error_string = “{“created”:”@1556750967.206353000”,“description”:“Error received from peer”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1017,“grpc_message”:“grakn.core.server.exception.TransactionException-Keyspace name is invalid: []. Keyspace name cannot start with a number, and can only contain maximum 48 characters of lower case, alphanumeric and underscore characters… Please check server logs for the stack trace.”,“grpc_status”:3}""


#2

It seems to me that you’re using the latest version of Client Python (i.e. 1.5.2) against an older version of the Grakn Server. What’s the version of the Grakn Server running?

you can check that via the terminal by running grakn version.


#3

it was actually the other way around (thanks for the tip!) … server was 1.5.2 but the Python client was 1.5.0. So, I updated the client to 1.5.2 but now I get this error (which unfortunately doesn’t tell me anything) …

"During handling of the above exception, another exception occurred:

Traceback (most recent call last):
[…]
transaction.query(graql_insert_query) # c
File “/Applications/anaconda3/lib/python3.7/site-packages/grakn/client.py”, line 131, in query
return self._tx_service.query(query, infer)
File “/Applications/anaconda3/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py”, line 49, in query
response = self._communicator.send(request)
File “/Applications/anaconda3/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py”, line 160, in send
raise GraknError(“Server/network error: {0}\n\n generated from request: {1}”.format(e, request))
grakn.exception.GraknError.GraknError: Server/network error: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = “null. Please check server logs for the stack trace.”
debug_error_string = “{“created”:”@1556804057.846056000",“description”:“Error received from peer”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1017,“grpc_message”:“null. Please check server logs for the stack trace.”,“grpc_status”:2}"

generated from request: query_req {
query: “insert $county isa county, has region-name “Adams County”, has adjacent-county-name"Mason County”;"
}"


#4

and here is the log output …

2019-05-02 13:33:34,882 [grpc-default-executor-2] ERROR g.c.s.r.SessionService$TransactionListener - Runtime Exception in RPC TransactionListener:
java.util.NoSuchElementException: null
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:204)
at grakn.core.server.kb.concept.ConceptImpl.lambda$new$0(ConceptImpl.java:45)
at grakn.core.server.kb.cache.Cache.get(Cache.java:52)
at grakn.core.server.kb.concept.ConceptImpl.currentShard(ConceptImpl.java:205)
at grakn.core.server.kb.concept.ThingImpl.type(ThingImpl.java:368)
at grakn.core.server.kb.concept.ThingImpl.(ThingImpl.java:86)
at grakn.core.server.kb.concept.RelationReified.(RelationReified.java:63)
at grakn.core.server.kb.concept.RelationReified.create(RelationReified.java:80)
at grakn.core.server.kb.concept.ElementFactory.buildRelationReified(ElementFactory.java:123)
at grakn.core.server.kb.concept.ElementFactory.lambda$buildRelation$5(ElementFactory.java:132)
at grakn.core.server.kb.concept.ElementFactory.getOrBuildConcept(ElementFactory.java:69)
at grakn.core.server.kb.concept.ElementFactory.getOrBuildConcept(ElementFactory.java:77)
at grakn.core.server.kb.concept.ElementFactory.buildRelation(ElementFactory.java:132)
at grakn.core.server.kb.concept.RelationTypeImpl.lambda$addRelation$1(RelationTypeImpl.java:75)
at grakn.core.server.kb.concept.TypeImpl.addInstance(TypeImpl.java:105)
at grakn.core.server.kb.concept.RelationTypeImpl.addRelation(RelationTypeImpl.java:74)
at grakn.core.server.kb.concept.RelationTypeImpl.create(RelationTypeImpl.java:66)
at grakn.core.graql.executor.ConceptBuilder.putInstance(ConceptBuilder.java:396)
at grakn.core.graql.executor.ConceptBuilder.tryPutConcept(ConceptBuilder.java:231)
at grakn.core.graql.executor.ConceptBuilder.build(ConceptBuilder.java:168)
at grakn.core.graql.executor.WriteExecutor.buildConcept(WriteExecutor.java:275)
at grakn.core.graql.executor.WriteExecutor.getConcept(WriteExecutor.java:388)
at grakn.core.graql.executor.property.RelationExecutor$InsertRelation.execute(RelationExecutor.java:194)
at grakn.core.graql.executor.WriteExecutor.write(WriteExecutor.java:236)
at grakn.core.graql.executor.QueryExecutor.lambda$insert$12(QueryExecutor.java:310)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at grakn.core.graql.executor.QueryExecutor.insert(QueryExecutor.java:311)
at grakn.core.server.session.TransactionOLTP.stream(TransactionOLTP.java:259)
at grakn.core.api.Transaction.stream(Transaction.java:296)
at grakn.core.server.rpc.SessionService$TransactionListener.query(SessionService.java:317)
at grakn.core.server.rpc.SessionService$TransactionListener.handleRequest(SessionService.java:197)
at grakn.core.server.rpc.SessionService$TransactionListener.lambda$onNext$1(SessionService.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-05-02 13:34:17,836 [grpc-default-executor-2] ERROR g.c.s.r.SessionService$TransactionListener - Runtime Exception in RPC TransactionListener:
java.util.NoSuchElementException: null
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:204)
at grakn.core.server.kb.concept.ConceptImpl.lambda$new$0(ConceptImpl.java:45)
at grakn.core.server.kb.cache.Cache.get(Cache.java:52)
at grakn.core.server.kb.concept.ConceptImpl.currentShard(ConceptImpl.java:205)
at grakn.core.server.kb.concept.ThingImpl.type(ThingImpl.java:368)
at grakn.core.server.kb.concept.ThingImpl.(ThingImpl.java:86)
at grakn.core.server.kb.concept.EntityImpl.(EntityImpl.java:37)
at grakn.core.server.kb.concept.EntityImpl.create(EntityImpl.java:45)
at grakn.core.server.kb.concept.ElementFactory.lambda$buildEntity$7(ElementFactory.java:142)
at grakn.core.server.kb.concept.ElementFactory.getOrBuildConcept(ElementFactory.java:69)
at grakn.core.server.kb.concept.ElementFactory.getOrBuildConcept(ElementFactory.java:77)
at grakn.core.server.kb.concept.ElementFactory.buildEntity(ElementFactory.java:142)
at grakn.core.server.kb.concept.EntityTypeImpl.lambda$create$0(EntityTypeImpl.java:54)
at grakn.core.server.kb.concept.TypeImpl.addInstance(TypeImpl.java:105)
at grakn.core.server.kb.concept.EntityTypeImpl.create(EntityTypeImpl.java:54)
at grakn.core.graql.executor.ConceptBuilder.putInstance(ConceptBuilder.java:394)
at grakn.core.graql.executor.ConceptBuilder.tryPutConcept(ConceptBuilder.java:231)
at grakn.core.graql.executor.ConceptBuilder.build(ConceptBuilder.java:168)
at grakn.core.graql.executor.WriteExecutor.buildConcept(WriteExecutor.java:275)
at grakn.core.graql.executor.WriteExecutor.getConcept(WriteExecutor.java:388)
at grakn.core.graql.executor.property.HasAttributeExecutor$InsertHasAttribute.execute(HasAttributeExecutor.java:143)
at grakn.core.graql.executor.WriteExecutor.write(WriteExecutor.java:236)
at grakn.core.graql.executor.QueryExecutor.insert(QueryExecutor.java:313)
at grakn.core.server.session.TransactionOLTP.stream(TransactionOLTP.java:259)
at grakn.core.api.Transaction.stream(Transaction.java:296)
at grakn.core.server.rpc.SessionService$TransactionListener.query(SessionService.java:317)
at grakn.core.server.rpc.SessionService$TransactionListener.handleRequest(SessionService.java:197)
at grakn.core.server.rpc.SessionService$TransactionListener.lambda$onNext$1(SessionService.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)


#5

Hi @RainerHilscher , the error you just posted usually happens when you manually migrate data folder from Grakn 1.5.1 to 1.5.2.
Have you done something similar by any chance or you have loaded directly in 1.5.2?


#6

no … I just run the Grakn Docker container … and my code … which runs fine when I run the 1.5.0 version of the server