Skip to content

Instantly share code, notes, and snippets.

@tk3369
Last active May 3, 2021 01:53
Show Gist options
  • Save tk3369/a5fcc55bd156f4eab68ba9e49338dc95 to your computer and use it in GitHub Desktop.
Save tk3369/a5fcc55bd156f4eab68ba9e49338dc95 to your computer and use it in GitHub Desktop.
TypeDBClient.jl test

My test code:

using TypeDBClient
import TypeDBClient.grakn.protocol as P

client = TypeDBClient.CoreClient("127.0.0.1", 1729)
session = TypeDBClient.CoreSession(client, "social_network", P.Session_Type.DATA)
transaction = TypeDBClient.CoreTransaction(session, session.sessionID, P.Transaction_Type.READ, TypeDBClient.TypeDBOptions())
result = TypeDBClient.match(transaction, raw"""
    match $loc has name "French Lick";
    get $loc;
    """)

Error:

julia> result = TypeDBClient.match(transaction, raw"""
           match $loc has name "French Lick";
           get $loc;
           """)
ERROR: LoadError: UndefVarError: gRPCServiceCallException not defined
Stacktrace:
 [1] single_request(bidirect_stream::TypeDBClient.BidirectionalStream, request::TypeDBClient.grakn.protocol.Transaction_Req, batch::Bool)
   @ TypeDBClient ~/OpenSource/GraknClient.jl/src/stream/BidirectionalStream.jl:52
 [2] query
   @ ~/OpenSource/GraknClient.jl/src/core/CoreTransaction.jl:61 [inlined]
 [3] execute
   @ ~/OpenSource/GraknClient.jl/src/core/CoreTransaction.jl:52 [inlined]
 [4] match(transaction::TypeDBClient.CoreTransaction, query::String, options::TypeDBClient.grakn.protocol.Options) (repeats 2 times)
   @ TypeDBClient ~/OpenSource/GraknClient.jl/src/query/QueryManager.jl:4
 [5] top-level scope
   @ Untitled-1:7
in expression starting at Untitled-1:7

Line 52 has this:

        throw(gRPCServiceCallException("The server don't deliver an answer. Please check the server log"))

No eror on server console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment