vaticle / typedb-driver-python Goto Github PK
View Code? Open in Web Editor NEWTypeDB Driver for Python
Home Page: https://typedb.com
License: Apache License 2.0
TypeDB Driver for Python
Home Page: https://typedb.com
License: Apache License 2.0
Our Python client needs to be upgraded to interact with Grakn 2.0. This is a major overhaul that heavily impacts the entire codebase.
The main goals are:
Once Python 2 support is removed, we should implement proper type annotations/hinting throughout the client.
Incomplete usage of __init__.__annotations__ = {...}
TODO figure out best solution, mypy, typing in python etc. Not sure what the current state of things is!
Our client-python E2E tests do not cover all the cases that Grakn clients are required to support. There is a high chance that there are still bugs present that have not been caught by our existing tests.
N/A
Make Client Python able to run our BDD scenarios.
bazel build //...
fails with the error: "TypeError: expected string or bytes-like object" (running python setup.py egg_info
)
bazel build //...
Project should build
It fails with the error: "TypeError: expected string or bytes-like object" (running python setup.py egg_info
)
pip3 install -r requirements_dev.txt
seems to succeed in these Python versions. So I think the issue is not with pip
itself but with Bazel's implementation of it.
Similar to issue #17
When inserting data using python client, random gRPC errors occur
Error random, but when inserting data using phone call examples, one might run into this error.
Seems to be happening when creating a new transaction.
No error.
erver/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":"@1559448052.745006000","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: open_req {
sessionId: "dh31abea9bc-7ba7-47e2-a776-05bf8c9a9499"
type: WRITE
}
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 156, in send
response = next(self._response_iterator)
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 364, in __next__
return self._next()
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 358, in _next
raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "null. Please check server logs for the stack trace."
debug_error_string = "{"created":"@1559448052.745006000","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}"
>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "migrate.py", line 31, in build_phone_call_graph
load_data_into_grakn(input, session)
File "migrate.py", line 40, in load_data_into_grakn
with session.transaction().write() as transaction:
File "/usr/local/lib/python3.7/site-packages/grakn/client.py", line 106, in write
transaction_service = TransactionService(self._session_id, _TxType.WRITE, self._transaction_rpc_constructor)
File "/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 39, in __init__
self._communicator.send(open_req)
File "/usr/local/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":"@1559448052.745006000","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: open_req {
sessionId: "dh31abea9bc-7ba7-47e2-a776-05bf8c9a9499"
type: WRITE
}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "migrate.py", line 303, in <module>
build_phone_call_graph(inputs)
File "migrate.py", line 34, in build_phone_call_graph
raise
File "/usr/local/lib/python3.7/site-packages/grakn/client.py", line 88, in __exit__
self.close()
File "/usr/local/lib/python3.7/site-packages/grakn/client.py", line 81, in close
self._stub.close(close_session_req)
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 533, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/usr/local/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.UNKNOWN
details = "null. Please check server logs for the stack trace."
debug_error_string = "{"created":"@1559448052.748124000","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}"
>
Logs from grakn server:
[grpc-default-executor-4] ERROR g.c.s.r.SessionService$TransactionListener - Runtime Exception in RPC TransactionListener:
io.grpc.StatusRuntimeException: CANCELLED: cancelled before receiving half close
at io.grpc.Status.asRuntimeException(Status.java:517)
at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:272)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:293)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:741)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
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)
Suppose we want to get the values of all the attributes of a certain EntityType. Based on this page https://dev.grakn.ai/docs/client-api/python I have two ways to execute a read transaction and reach my goal.
First approach:
Using the latter approach I noticed benefits in terms of performance when as a query I have a rule as discussed here vaticle/typedb#5227. However, the disadvantage is that I must specify the label (product in this case) of the EntityType of interest, while with the first approach I can always use the same variable x and formulate the query by associating the variable x with the EntityType of interest.
For this reason it would be useful to implement a get method similar to the following
We currently set the Python environment to version 3.6.10 with a pyenv
command in automation.yml
. But most users will be on Python 3.8 or 3.9 by now.
Try using Python 3.8 (or whatever is the standard when this issue is tackled).
We would ideally use whatever Python is installed in Grabl, thus eliminating the need for a pyenv
call in this Grabl CI file.
When a transaction fails with an exception (on the server), it is not closed on the client.
Steps to create the smallest reproducible scenario:
transaction.query('match typo');
transaction.query('match whatever');
Receive an exception saying that the transaction has already been closed.
Nothing happens
Hello,
In my local machine (python 3.8.2 on macos big sur ), I am experimenting with grakn server 2.0.0-alpha-8 with python client grakn-client==2.0.0a10.
Using the Grakn console, I am able to do create-delete databases, load schemas, insert data, and read it,
However, in python client I am having serious issues with reading data from the database.
I have a very simple db called 'grakn' where i inserted 6 lion entities (it was an example in the documentation)
With the code below I successfully get a map object,
from grakn.client import GraknClient, SessionType, TransactionType
q='match $x isa lion; get $x;'
with GraknClient.core("localhost:1729") as client:
with client.session("grakn", SessionType.DATA) as session:
with session.transaction(TransactionType.READ) as tx:
answer_iterator = tx.query().match(q)
print(answer_iterator)
When I want to access fields of it either via iteration as "for x in aswer_iterator etc" or via trying to convert it to a list "list(answer_iterator)" as shown in the examples in the documentation of the client, i get the following error:
GraknClientException: The encoding 0 was not recognised.
Any idea how I can troubleshoot the issue?
Thanks
grpcio
fails to build using bazel build //...
on Python 3.8. The C compiler throws multiple unresolvable errors.
The issue can be resolved by upgrading grpcio
to 1.33.1.
Given that this upgrade is desirable anyway, we should get on with it.
bazel build //...
Blindly upgrading gRPC is not sensible - it causes an issue where all RPC requests fail in Grakn. However, we can resolve this by also upgrading Netty to 4.1.51.
If you have an .gql file, that contains definitions and inserts then this causes an exception
with open("/path/grakn/grakn-core-all-linux-1.5.0/tests/foo.gpl") as f:
definitions_and_inserts = f.read()
with GraknClient(uri="localhost:48555") as client:
with client.session(keyspace="test") as session:
with session.transaction().write() as write_transaction:
write_transaction.query(definitions_and_inserts)
write_transaction.commit()
but from console this works:
./grakn console --keyspace test --file tests/foo.gql
To avoid such behavior the original .gql file need to be split in two parts, definitions as one and inserts as the other like this:
with open("/path/grakn/grakn-core-all-linux-1.5.0/tests/foo_d.gpl") as f:
definitions = f.read()
with open("/path/grakn/grakn-core-all-linux-1.5.0/tests/foo_i.gpl") as f:
inserts = f.read()
with GraknClient(uri="localhost:48555") as client:
with client.session(keyspace="test") as session:
with session.transaction().write() as write_transaction:
write_transaction.query(definitions)
write_transaction.query(insert)
write_transaction.commit()
Now the definitions are committable, but unfortunately the insert part still fails with exceptions.
So one needs to do the following:
with open("/path/grakn/grakn-core-all-linux-1.5.0/tests/foo_i.gpl") as f:
inserts = [e for e in f.read().split("\n\n") if e.strip() and not e.startswith("#")]
# Attention see below
with GraknClient(uri="localhost:48555") as client:
with client.session(keyspace="test") as session:
with session.transaction().write() as write_transaction:
write_transaction.query(definitions)
for insert in inserts:
write_transaction.query(insert)
write_transaction.commit()
But since in the foo_i.gql some of the inserts are multilines (match\n..\n..insert\n..\n
) one need to insert blank lines to make an easy split with little logic (not empty and not just a comment which also causes exceptions) and split at \n\n
. This is painful since one needs to also split up single-line inserts with blank lines.
Example:
insert $n isa NNP, has Lemma "Geldstrafe";
insert $z isa NZP, has Lemma "Jahre", has Eigenschaft "bis zu fünf (<=5)";
match
$NO isa NEP, has Lemma "Wer";
$DO isa NEP, has Lemma "anderer";
$AO isa NNP, has Lemma "Sache";
$PO isa NNP, has Lemma "in der Absicht";
insert
$VP (NO: $NO, DO: $DO, AO: $AO, PO: $PO) isa VP;
$VP has Lemma "wegnehmen";
match
$A1 isa NEP, has Lemma "Wer";
$A2 isa NEP, has Lemma "Dritter";
insert
$Alt (Alt_1: $A1, Alt_2: $A2) isa Alternative;
$Alt has Lemma "oder";
(the blank line between the first two inserts is painful especially if you have a lot of them).
Since my guess is that you don't want to change the behaviour of write_transaction.query()
it be great to have a write_transaction.from_file()
which would take the path to the original foo.gql
and read it without exceptions like:
with GraknClient(uri="localhost:48555") as client:
with client.session(keyspace="test") as session:
with session.transaction().write() as write_transaction:
write_transaction.from_file("/path/grakn/grakn-core-all-linux-1.5.0/tests/foo.gpl")
write_transaction.commit()
Not all Graql query BDD tests are called in CI.
Call all Graql query BDD tests in CI, and make sure they pass.
There are two errors:
ci:release-notes error (https://circleci.com/gh/graknlabs/client-python/2166)
ci:release-notes
would fail when pyenv global is set to 2.7.123.5.2. If we remove the pyenv call, it will work
pyenv global 2.7.12 3.5.2
pip install certifi
export RELEASE_NOTES_TOKEN=$REPO_GITHUB_TOKEN
bazel run @graknlabs_build_tools//ci:release-notes -- client-python $(cat VERSION) ./RELEASE_TEMPLATE.md
...
Traceback (most recent call last):
File "/home/********/.cache/bazel/_bazel_********/a3bf690c4bacc2f8a31e33bc35f6090b/execroot/graknlabs_client_python/bazel-out/k8-fastbuild/bin/external/graknlabs_build_tools/ci/release-notes.runfiles/graknlabs_build_tools/ci/release-notes.py", line 3, in <module>
import github
File "/home/********/.cache/bazel/_bazel_********/a3bf690c4bacc2f8a31e33bc35f6090b/execroot/graknlabs_client_python/bazel-out/k8-fastbuild/bin/external/graknlabs_build_tools/ci/release-notes.runfiles/pypi__PyGithub_1_43_2/github/__init__.py", line 42, in <module>
from github.MainClass import Github, GithubIntegration
File "/home/********/.cache/bazel/_bazel_********/a3bf690c4bacc2f8a31e33bc35f6090b/execroot/graknlabs_client_python/bazel-out/k8-fastbuild/bin/external/graknlabs_build_tools/ci/release-notes.runfiles/pypi__PyGithub_1_43_2/github/MainClass.py", line 53, in <module>
from httplib import HTTPSConnection
ImportError: No module named 'httplib'
deploy-github error (https://circleci.com/gh/graknlabs/client-python/2168)
deploy-github
would fail if pyenv global is set to 2.7.123.5.2. I did not try testing invoking deploy-github without setting pyenv, so I didn't know if it'll work without the pyenv call.
pyenv global 2.7.12 3.5.2
export DEPLOY_GITHUB_TOKEN=$REPO_GITHUB_TOKEN
bazel run --define version=$(cat VERSION) //:deploy-github -- $CIRCLE_SHA1
...
Could not find pip-provided dependency: 'enum34'
ERROR: Skipping '//:deploy-github': no such target '//:deploy-github': target 'deploy-github' not declared in package '' defined by /home/********/client-python/BUILD
To use the class Concept
in Python it is necessary to import as follows:
from grakn.service.Session.Concept import Concept
is_a_concept = isInstance(my_concept, Concept.Concept)
From a user perspective this is confusing since there is a package called Concept
, containing a file called Concept
, containing a class called Concept
.
I believe ideal best practice would be to use lower case names for packages, and that they should be named according to a summary of their content. I don't know whether this would conflict with our naming across our other drivers but something should be done to limit the confusion here if possible.
calling client.databases().delete(<database>)
raises AttributeError:
'_DatabaseManagerRPC' object has no attribute 'delete'
Steps to create the smallest reproducible scenario:
Open a Python REPL, then
from grakn.client import *
client = GraknClient.core("localhost:1729")
client.databases().create(“test”)
client.databases().delete("test”)
silent deletion of "test" database
Traceback (most recent call last):
File "", line 1, in
AttributeError: '_DatabaseManagerRPC' object has no attribute 'delete'
Asynchronicity is not explicit.
We should consider use of the asyncio
library to enable an async/await syntax, much like what is used in Client NodeJS.
However, I'm currently 50/50 on this idea. While we do use async/await in client-nodejs, and it works well for highlighting remote calls that need to be awaited, as well as allowing people to execute remote calls in the background, it isn't exactly... pretty, at least in the Concept API when chaining multiple Concept API calls. Moreover, we don't have it in client-java.
But it may be nicer to use for users. We already had one request to support async and await.
Ideally, we should consult with experienced Python users to help make a call on this. We should also check if adding asyncio
breaks compatibility with existing code, or if it can be integrated seamlessly - since, probably, not everyone wants to be writing async and await everywhere when they use typedb-client
.
Grakn version: 1.5 SNAPSHOT (c80b4d644aec10895171c2083ed0378b506b01f0)
Client version: 1.5 SNAPSHOT (http://repo.grakn.ai/repository/test-pypi-group/packages/grakn-client/1.5.0-252e5170fb3b13a0c08f7b9c5de59cb2b0a15ef4/grakn-client-1.5.0-252e5170fb3b13a0c08f7b9c5de59cb2b0a15ef4.tar.gz)
import grakn
client = grakn.Grakn(uri="localhost:48555")
with client.session(keyspace="test") as session:
with session.transaction(grakn.TxType.READ) as transaction:
print(client, session, transaction)
see the correct result of the print statement.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 145, in send
response = next(self._response_iterator)
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 363, in __next__
return self._next()
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 357, in _next
raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "null. Please check server logs for the stack trace."
debug_error_string = "{"created":"@1551193247.463363000","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1036,"grpc_message":"null. Please check server logs for the stack trace.","grpc_status":2}"
>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 5, in <module>
with session.transaction(grakn.TxType.READ) as transaction:
File "/usr/local/lib/python3.7/site-packages/grakn/__init__.py", line 74, in transaction
transaction_service = TransactionService(self.keyspace, tx_type, self.credentials, self._stub.transaction)
File "/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 39, in __init__
self._communicator.send(open_req)
File "/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 149, in send
raise ClientError("Server/network error: {0}\n\n generated from request: {1}".format(e, request))
grakn.exception.ClientError.ClientError: 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":"@1551193247.463363000","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1036,"grpc_message":"null. Please check server logs for the stack trace.","grpc_status":2}"
>
generated from request: open_req {
keyspace: "test"
}
2019-02-26 15:00:47,454 [grpc-default-executor-0] ERROR g.c.s.r.SessionService$TransactionListener - Runtime Exception in RPC TransactionListener:
java.lang.NullPointerException: null
at grakn.core.server.rpc.SessionService$TransactionListener.open(SessionService.java:271)
at grakn.core.server.rpc.SessionService$TransactionListener.handleRequest(SessionService.java:191)
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)
For our other repositories, such as docs
and examples
to depend on the latest master of client-python
in a conventional way, we need client-python
to be deployed to our private pypi registry on every commit made on the master
branch.
Client-python does not set a client-side timeout, and will stall forever if the network gets interrupted
Grakn version:
1.5
Reproducible step:
grakn server start
try (GraknClient.Session session = new GraknClient("localhost:48555").session("grakn")) {
while (true) {
GraknClient.Transaction tx = session.transaction(Transaction.Type.WRITE);
tx.execute(Graql.match(var("x").sub("thing")).get());
System.out.println("query");
tx.commit();
}
}
kill -STOP <grakn process id>
TODO
client1 = new Grakn(DEFAULT_URI, 20) // timeout set to 20 seconds
client2 = new Grakn(DEFAULT_URI) // timeout set to the default timeout, eg., 15 seconds
Currently, each session pulse is sent in a separate thread; a few minutes of keeping session open shows the thread number grow:
In [60]: threading.enumerate()
Out[60]:
[<_MainThread(MainThread, started 140324098783040)>,
<HistorySavingThread(IPythonHistorySavingThread, started 140324065166912)>,
<Thread(Thread-293, started daemon 140323535701568)>,
<Thread(Thread-294, started daemon 140323552486976)>]
Refactor proposals:
concurrent.futures.ThreadPoolExecutor
which creates new threads on demand (but keeps some alive and doesn't create excess of them)In [1]: from concurrent.futures import ThreadPoolExecutor
In [2]: ex = ThreadPoolExecutor(thread_name_prefix='session_pulse_6688ccd6278d4b959a499f4cb2e49ffb')
In [3]: threading.enumerate()
Out[3]:
[<_MainThread(MainThread, started 139758585063232)>,
<HistorySavingThread(IPythonHistorySavingThread, started 139758551447104)>,
<Thread(session_pulse_6688ccd6278d4b959a499f4cb2e49ffb_0, started daemon 139758437135936)>]
pip3 install grakn-client
fails to install Python client
Steps to create the smallest reproducible scenario:
pip3 install grakn-client
Installed
Collecting grakn-client
Using cached https://files.pythonhosted.org/packages/d5/1b/3175ae4c5cc4c039073533aae0e1d25aea0acdea3c29787b3ddfda8c970f/grakn-client-1.6.0.tar.gz
Collecting grpcio==1.16.0 (from grakn-client)
Using cached https://files.pythonhosted.org/packages/be/84/9afa550ae7bfc65a7150f66ecdbf267617a2d584d9f845b4ef7d026a24ad/grpcio-1.16.0.tar.gz
Collecting protobuf==3.6.1 (from grakn-client)
Using cached https://files.pythonhosted.org/packages/77/78/a7f1ce761e2c738e209857175cd4f90a8562d1bde32868a8cd5290d58926/protobuf-3.6.1-py2.py3-none-any.whl
Collecting six==1.11.0 (from grakn-client)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting enum-compat==0.0.2 (from grakn-client)
Using cached https://files.pythonhosted.org/packages/95/6e/26bdcba28b66126f66cf3e4cd03bcd63f7ae330d29ee68b1f6b623550bfa/enum-compat-0.0.2.tar.gz
Requirement already satisfied: setuptools in c:\users\michael\projects\graknworkbench\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg (from protobuf==3.6.1->grakn-client) (40.8.0)
Installing collected packages: six, grpcio, protobuf, enum-compat, grakn-client
Running setup.py install for grpcio ... error
Complete output from command C:\Users\Michael\Projects\GraknWorkbench\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Michael\\AppData\\Local\\Temp\\pip-install-xguw__my\\grpcio\\setup.py';f=getattr(tokenize, 'open', open)(__file__)
;code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Michael\AppData\Local\Temp\pip-record-86jkdfzm\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Michael\Projects\
GraknWorkbench\venv\include\site\python3.8\grpcio:
Found cython-generated files...
running install
running build
running build_py
running build_project_metadata
creating python_build
creating python_build\lib.win32-3.8
creating python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_auth.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_channel.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_common.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_grpcio_metadata.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_interceptor.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_plugin_wrapping.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_server.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\_utilities.py -> python_build\lib.win32-3.8\grpc
copying src\python\grpcio\grpc\__init__.py -> python_build\lib.win32-3.8\grpc
creating python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\implementations.py -> python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\interfaces.py -> python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\utilities.py -> python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\_client_adaptations.py -> python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\_metadata.py -> python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\_server_adaptations.py -> python_build\lib.win32-3.8\grpc\beta
copying src\python\grpcio\grpc\beta\__init__.py -> python_build\lib.win32-3.8\grpc\beta
creating python_build\lib.win32-3.8\grpc\experimental
copying src\python\grpcio\grpc\experimental\gevent.py -> python_build\lib.win32-3.8\grpc\experimental
copying src\python\grpcio\grpc\experimental\session_cache.py -> python_build\lib.win32-3.8\grpc\experimental
copying src\python\grpcio\grpc\experimental\__init__.py -> python_build\lib.win32-3.8\grpc\experimental
creating python_build\lib.win32-3.8\grpc\framework
copying src\python\grpcio\grpc\framework\__init__.py -> python_build\lib.win32-3.8\grpc\framework
creating python_build\lib.win32-3.8\grpc\_cython
copying src\python\grpcio\grpc\_cython\__init__.py -> python_build\lib.win32-3.8\grpc\_cython
creating python_build\lib.win32-3.8\grpc\framework\common
copying src\python\grpcio\grpc\framework\common\cardinality.py -> python_build\lib.win32-3.8\grpc\framework\common
copying src\python\grpcio\grpc\framework\common\style.py -> python_build\lib.win32-3.8\grpc\framework\common
copying src\python\grpcio\grpc\framework\common\__init__.py -> python_build\lib.win32-3.8\grpc\framework\common
creating python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\abandonment.py -> python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\callable_util.py -> python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\future.py -> python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\logging_pool.py -> python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\stream.py -> python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\stream_util.py -> python_build\lib.win32-3.8\grpc\framework\foundation
copying src\python\grpcio\grpc\framework\foundation\__init__.py -> python_build\lib.win32-3.8\grpc\framework\foundation
creating python_build\lib.win32-3.8\grpc\framework\interfaces
copying src\python\grpcio\grpc\framework\interfaces\__init__.py -> python_build\lib.win32-3.8\grpc\framework\interfaces
creating python_build\lib.win32-3.8\grpc\framework\interfaces\base
copying src\python\grpcio\grpc\framework\interfaces\base\base.py -> python_build\lib.win32-3.8\grpc\framework\interfaces\base
copying src\python\grpcio\grpc\framework\interfaces\base\utilities.py -> python_build\lib.win32-3.8\grpc\framework\interfaces\base
copying src\python\grpcio\grpc\framework\interfaces\base\__init__.py -> python_build\lib.win32-3.8\grpc\framework\interfaces\base
creating python_build\lib.win32-3.8\grpc\framework\interfaces\face
copying src\python\grpcio\grpc\framework\interfaces\face\face.py -> python_build\lib.win32-3.8\grpc\framework\interfaces\face
copying src\python\grpcio\grpc\framework\interfaces\face\utilities.py -> python_build\lib.win32-3.8\grpc\framework\interfaces\face
copying src\python\grpcio\grpc\framework\interfaces\face\__init__.py -> python_build\lib.win32-3.8\grpc\framework\interfaces\face
creating python_build\lib.win32-3.8\grpc\_cython\_cygrpc
copying src\python\grpcio\grpc\_cython\_cygrpc\__init__.py -> python_build\lib.win32-3.8\grpc\_cython\_cygrpc
creating python_build\lib.win32-3.8\grpc\_cython\_credentials
copying src\python\grpcio\grpc\_cython\_credentials\roots.pem -> python_build\lib.win32-3.8\grpc\_cython\_credentials
running build_ext
Found cython-generated files...
building 'grpc._cython.cygrpc' extension
creating python_build\temp.win32-3.8
creating python_build\temp.win32-3.8\Release
creating python_build\temp.win32-3.8\Release\src
creating python_build\temp.win32-3.8\Release\src\python
creating python_build\temp.win32-3.8\Release\src\python\grpcio
creating python_build\temp.win32-3.8\Release\src\python\grpcio\grpc
creating python_build\temp.win32-3.8\Release\src\python\grpcio\grpc\_cython
creating python_build\temp.win32-3.8\Release\third_party
creating python_build\temp.win32-3.8\Release\third_party\address_sorting
creating python_build\temp.win32-3.8\Release\src\core
creating python_build\temp.win32-3.8\Release\src\core\lib
creating python_build\temp.win32-3.8\Release\src\core\lib\gpr
creating python_build\temp.win32-3.8\Release\src\core\lib\gprpp
creating python_build\temp.win32-3.8\Release\src\core\lib\profiling
creating python_build\temp.win32-3.8\Release\src\core\lib\surface
creating python_build\temp.win32-3.8\Release\src\core\lib\avl
creating python_build\temp.win32-3.8\Release\src\core\lib\backoff
creating python_build\temp.win32-3.8\Release\src\core\lib\channel
creating python_build\temp.win32-3.8\Release\src\core\lib\compression
creating python_build\temp.win32-3.8\Release\src\core\lib\debug
creating python_build\temp.win32-3.8\Release\src\core\lib\http
creating python_build\temp.win32-3.8\Release\src\core\lib\iomgr
creating python_build\temp.win32-3.8\Release\src\core\lib\json
creating python_build\temp.win32-3.8\Release\src\core\lib\slice
creating python_build\temp.win32-3.8\Release\src\core\lib\transport
creating python_build\temp.win32-3.8\Release\src\core\ext
creating python_build\temp.win32-3.8\Release\src\core\ext\transport
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\server
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\server\secure
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\transport
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\alpn
creating python_build\temp.win32-3.8\Release\src\core\ext\filters
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\http
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\http\client
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\http\message_compress
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\http\server
creating python_build\temp.win32-3.8\Release\src\core\lib\security
creating python_build\temp.win32-3.8\Release\src\core\lib\security\context
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\alts
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\composite
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\fake
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\google_default
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\iam
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\jwt
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\local
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\oauth2
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\plugin
creating python_build\temp.win32-3.8\Release\src\core\lib\security\credentials\ssl
creating python_build\temp.win32-3.8\Release\src\core\lib\security\security_connector
creating python_build\temp.win32-3.8\Release\src\core\lib\security\transport
creating python_build\temp.win32-3.8\Release\src\core\lib\security\util
creating python_build\temp.win32-3.8\Release\src\core\tsi
creating python_build\temp.win32-3.8\Release\src\core\tsi\alts
creating python_build\temp.win32-3.8\Release\src\core\tsi\alts\crypt
creating python_build\temp.win32-3.8\Release\src\core\tsi\alts\frame_protector
creating python_build\temp.win32-3.8\Release\src\core\tsi\alts\handshaker
creating python_build\temp.win32-3.8\Release\src\core\tsi\alts\zero_copy_frame_protector
creating python_build\temp.win32-3.8\Release\third_party\nanopb
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\client
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\client\insecure
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\deadline
creating python_build\temp.win32-3.8\Release\src\core\tsi\ssl
creating python_build\temp.win32-3.8\Release\src\core\tsi\ssl\session_cache
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\client\secure
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\chttp2\server\insecure
creating python_build\temp.win32-3.8\Release\src\core\ext\transport\inproc
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb\proto
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc\lb
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc\lb\v1
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc\lb\v1\google
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc\lb\v1\google\protobuf
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\resolver
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\resolver\fake
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\pick_first
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\lb_policy\round_robin
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\resolver\dns
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\resolver\dns\c_ares
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\resolver\dns\native
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\client_channel\resolver\sockaddr
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\census
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\max_age
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\message_size
creating python_build\temp.win32-3.8\Release\src\core\ext\filters\workarounds
creating python_build\temp.win32-3.8\Release\src\core\plugin_registry
creating python_build\temp.win32-3.8\Release\src\boringssl
creating python_build\temp.win32-3.8\Release\third_party\boringssl
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\asn1
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\base64
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\bio
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\bn_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\buf
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\bytestring
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\chacha
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\cipher_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\cmac
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\conf
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\curve25519
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\dh
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\digest_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\dsa
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\ec_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\ecdh
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\ecdsa_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\engine
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\err
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\evp
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\fipsmodule
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\hkdf
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\lhash
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\obj
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\pem
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\pkcs7
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\pkcs8
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\poly1305
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\pool
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\rand_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\rc4
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\rsa_extra
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\stack
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\x509
creating python_build\temp.win32-3.8\Release\third_party\boringssl\crypto\x509v3
creating python_build\temp.win32-3.8\Release\third_party\boringssl\ssl
creating python_build\temp.win32-3.8\Release\third_party\boringssl\third_party
creating python_build\temp.win32-3.8\Release\third_party\boringssl\third_party\fiat
creating python_build\temp.win32-3.8\Release\third_party\zlib
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DOPENSSL_NO_ASM=1 -D_WIN32_WINNT=1536 -DGPR_BACKWARDS_COMPATIBILITY_MODE=1 -DWIN32_LEAN_AND_MEAN=1 -DCARES_STATICLI
B=1 -DGRPC_ARES=0 -DNTDDI_VERSION=100663296 -DNOMINMAX=1 -DNTDDI_VERSION=100663296 -Isrc\python\grpcio -Iinclude -I. -Ithird_party\boringssl\include -Ithird_party\zlib -Ithird_party\nanopb -Ithird_party\cares -Ithird_party\cares\cares -Ithird_party\address_sorting\inc
lude -IC:\Users\Michael\Projects\GraknWorkbench\venv\include -IC:\Users\Michael\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\Michael\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\
Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Window
s Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc\python\grpcio\grpc/_cython/cygrpc.cpp /Fopython_build\temp.win32-3.8\Release\
src\python\grpcio\grpc/_cython/cygrpc.obj -std=c++11 -DPB_FIELD_16BIT
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cygrpc.cpp
src\python\grpcio\grpc/_cython/cygrpc.cpp(1365): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
creating Users
creating Users\Michael
creating Users\Michael\AppData
creating Users\Michael\AppData\Local
creating Users\Michael\AppData\Local\Temp
creating Users\Michael\AppData\Local\Temp\tmp5i1gp4i9
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Michael\Projects\GraknWorkbench\venv\include -IC:\Users\Michael\AppData\Local\Programs\Python\Python38-32
\include -IC:\Users\Michael\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)
\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Fi
les (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /TcC:\Users\Michael\AppData\Local\Temp\tmp5i1gp4i9\a.c /FoUsers\Michael\AppData\Local\Temp\tmp5i1gp4i9\a.obj
a.c
Traceback (most recent call last):
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 438, in compile
self.spawn(args)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 557, in spawn
return super().spawn(cmd)
File "C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\src\python\grpcio\_spawn_patch.py", line 54, in _commandfile_spawn
_classic_spawn(self, command)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\spawn.py", line 80, in _spawn_nt
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\src\python\grpcio\commands.py", line 301, in build_extensions
build_ext.build_ext.build_extensions(self)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\Michael\Projects\GraknWorkbench\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\build_ext.py", line 199, in build_extension
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 440, in compile
raise CompileError(msg)
distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\setup.py", line 332, in <module>
setuptools.setup(
File "C:\Users\Michael\Projects\GraknWorkbench\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Michael\Projects\GraknWorkbench\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\install.py", line 61, in run
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Michael\Projects\GraknWorkbench\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\build_ext.py", line 78, in run
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\src\python\grpcio\commands.py", line 305, in build_extensions
raise CommandError(
commands.CommandError: Failed `build_ext` step:
Traceback (most recent call last):
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 438, in compile
self.spawn(args)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 557, in spawn
return super().spawn(cmd)
File "C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\src\python\grpcio\_spawn_patch.py", line 54, in _commandfile_spawn
_classic_spawn(self, command)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\spawn.py", line 80, in _spawn_nt
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\src\python\grpcio\commands.py", line 301, in build_extensions
build_ext.build_ext.build_extensions(self)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\Michael\Projects\GraknWorkbench\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\build_ext.py", line 199, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "C:\Users\Michael\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 440, in compile
raise CompileError(msg)
distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\Michael\Projects\GraknWorkbench\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Michael\\AppData\\Local\\Temp\\pip-install-xguw__my\\grpcio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Michael\AppData\Local\Temp\pip-record-86jkdfzm\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Michael\Projects\GraknWorkbench\venv\incl
ude\site\python3.8\grpcio" failed with error code 1 in C:\Users\Michael\AppData\Local\Temp\pip-install-xguw__my\grpcio\
Installs on Linux fine. Looks like maybe an issue with gRPC? Not sure. Need assistance. In middle of project. Thanks so much! Seems like it starts to fail at: (see above)
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cygrpc.cpp
src\python\grpcio\grpc/_cython/cygrpc.cpp(1365): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
OS: KDE Neon 5.18.5 (Ubuntu 18.04 LTS); 5.3.0-51-generic
CPython: 3.8.2, using Pyenv 1.2.18 and Poetry 1.0.5
➜ poetry show --tree
pytest 5.4.2 pytest: simple powerful testing with Python
├── atomicwrites >=1.0
├── attrs >=17.4.0
├── colorama *
├── more-itertools >=4.0.0
├── packaging *
│ ├── pyparsing >=2.0.2
│ └── six *
├── pluggy >=0.12,<1.0
├── py >=1.5.0
└── wcwidth *
When I go to install grakn-client with "poetry add grakn-client" or "pip install grakn-client", I get the following error. This occurs with the project's Poetry virtualenv enabled and disabled.
ERROR: Command errored out with exit status 1: command: /home/user/Development/Projects/Python/KnowledgeGraph/.venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-logm33dw/grakn-client/setup.py'"'"'; file='"'"'/tmp/pip-install-logm33dw/grakn-client/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-p8y0pq8l cwd: /tmp/pip-install-logm33dw/grakn-client/ Complete output (11 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/user/Development/Projects/Python/KnowledgeGraph/.venv/lib/python3.8/site-packages/setuptools/init.py", line 19, in <module> from setuptools.dist import Distribution File "/home/user/Development/Projects/Python/KnowledgeGraph/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 34, in <module> from setuptools import windows_support File "/home/user/Development/Projects/Python/KnowledgeGraph/.venv/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module> import ctypes File "/home/user/.pyenv/versions/3.8.2/lib/python3.8/ctypes/init.py", line 7, in <module> from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The install always fails on enum-compat. Grakn-client attempts to install enum-compat==0.0.2, even if 0.0.3 (which installs fine) is already present.
@flyingsilverfin raising the bug as discussed in stackoverflow.
While trying to create a session to grakn keyspace,after the grakn server is idle for sometime, i am getting session error.
I am using a python 3.6 application which has grakn-client of version 1.6.0 and the grakn server version is 1.6.0. I am getting this error intermittently. Only after the grakn server is idle for some time and on the first try. Trying to connect again after this error, with create the sessionid.
Could not obtain sessionId for keyspace abc
The error generated by python grakn-client is
<_Rendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = “OS Error” debug_error_string = “{“created”:”@1592293927.075671633",“description”:“Error received from peer”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1017,“grpc_message”:“OS Error”,“grpc_status”:14}"
Also we are getting this error while trying to retrive all keyspace name list. client.keyspaces().retrieve() is also throwing this error intermittendly
No error
{ <_Rendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = “OS Error” debug_error_string = “{“created”:”@1592293927.075671633",“description”:“Error received from peer”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1017,“grpc_message”:“OS Error”,“grpc_status”:14} }
In Python client API, .transaction.execute() produces the error AttributeError: 'Transaction' object has no attribute 'execute'
in terminal:
grakn server start
grakn console -k socialnetwork --f schema.gql
grakn console -k socialnetwork --f data.gql
in Python:
client = GraknClient(uri="localhost:48555")
from grakn.client import GraknClient
with client.session(keyspace="socialnetwork") as session:
with session.transaction().read() as read_transaction:
answer_iterator = read_transaction.execute(query="match $x sub person; get; limit 1;")
Expected answer_iterator to be an iterator yielding the 'person' type
AttributeError: 'Transaction' object has no attribute 'execute'
Right now, users of client-python always get a stacked error message:
In [14]: s.transaction().write()
---------------------------------------------------------------------------
_Rendezvous Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py in send_receive(self, request)
208 self._add_request(request)
--> 209 response = next(self._response_iterator)
210 except Exception as e: # specialize into different gRPC exceptions?
/usr/local/lib/python3.7/site-packages/grpc/_channel.py in __next__(self)
387 def __next__(self):
--> 388 return self._next()
389
/usr/local/lib/python3.7/site-packages/grpc/_channel.py in _next(self)
381 elif self._state.code is not None:
--> 382 raise self
383
_Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "grakn.core.kb.server.exception.SessionException-The client session with session ID [testing0037b22d-67ce-4df3-8ee3-2733989855ad] was not found. Create a new session to interact with the graph.. Please check server logs for the stack trace."
debug_error_string = "{"created":"@1591890637.307174000","description":"Error received from peer ipv6:[::1]:48555","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"grakn.core.kb.server.exception.SessionException-The client session with session ID [testing0037b22d-67ce-4df3-8ee3-2733989855ad] was not found. Create a new session to interact with the graph.. Please check server logs for the stack trace.","grpc_status":14}"
>
During handling of the above exception, another exception occurred:
GraknError Traceback (most recent call last)
<ipython-input-14-bad13dd12b5f> in <module>()
----> 1 s.transaction().write()
/usr/local/lib/python3.7/site-packages/grakn/client.py in write(self)
104
105 def write(self):
--> 106 transaction_service = TransactionService(self._session_id, _TxType.WRITE, self._transaction_rpc_constructor)
107 return Transaction(transaction_service)
108
/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py in __init__(self, session_id, tx_type, transaction_endpoint)
37 # open the transaction with an 'open' message
38 open_req = RequestBuilder.open_tx(session_id, tx_type)
---> 39 self._communicator.send_receive(open_req)
40 __init__.__annotations__ = {'tx_type': enums.TxType}
41
/usr/local/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py in send_receive(self, request)
211 # invalidate this communicator, functionally this occurs automatically on exception (iterator not usable anymore)
212 self._closed = True
--> 213 raise GraknError("Server/network error: {0}\n\n generated from request: {1}".format(e, request))
214
215 if response is None:
GraknError: Server/network error: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "grakn.core.kb.server.exception.SessionException-The client session with session ID [testing0037b22d-67ce-4df3-8ee3-2733989855ad] was not found. Create a new session to interact with the graph.. Please check server logs for the stack trace."
debug_error_string = "{"created":"@1591890637.307174000","description":"Error received from peer ipv6:[::1]:48555","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"grakn.core.kb.server.exception.SessionException-The client session with session ID [testing0037b22d-67ce-4df3-8ee3-2733989855ad] was not found. Create a new session to interact with the graph.. Please check server logs for the stack trace.","grpc_status":14}"
>
generated from request: open_req {
sessionId: "testing0037b22d-67ce-4df3-8ee3-2733989855ad"
type: WRITE
}
Ideally, we would only throw a single exception with the server side exception/error message within it.
Grakn Core any version with any client-python since approx 1.4
Cause any error in client-python
Single, neatly wrapped exception with the server's error
Two client-side stack traces! And buried within these are the server error message, duplicated twice.
We could mirror the style of errors occuring in the server, where a specific class of RuntimeException is caught at the very top level of everything, and printed out without a stack trace, just error message.
At the moment, there is no straight forward way of checking whether a transaction is still open.
Run some basic query and see if a Transaction is already closed
error is returned.
Expose is_open
on transaction
At the moment pypi_dependencies
and pypi_deployment_dependencies
are pulled in from Grakn Core, where they've recently been removed and are not available anymore. In fact, if client-python
depends on the latest commit of Grakn master, bazel build //...
would break.
These two dependencies need to be defined as the direct dependencies of client-python
.
When running client-python, the following DeprecationWarning is raised at a number of places in grakn_protocol/protobuf/options_pb2
/Users/rkm916/Library/Caches/pypoetry/virtualenvs/grakn-dev-utils-UF7XQuoC-py3.9/lib/python3.9/site-packages/grakn_protocol/protobuf/options_pb2.py:84: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
Steps to create the smallest reproducible scenario:
See warning above
I've installed grakn-client through pip like mentioned on pypi or in the grakn docs. Installation worked successfully but after importing
from grakn.client import GraknClient
I get the Error:
ModuleNotFoundError: No module named 'grakn.client'; 'grakn' is not a package
Steps to create the smallest reproducible scenario:
pip install grakn-client
from grakn.client import GraknClient
Nothing.
Traceback (most recent call last): File "c:/Users/Johannes/testing/grakn.py", line 1, in <module> from grakn.client import GraknClient File "c:\Users\Johannes\testing\grakn.py", line 1, in <module> from grakn.client import GraknClient ModuleNotFoundError: No module named 'grakn.client'; 'grakn' is not a package
This issue contains the collection of changes that need to be made in Client Python in order to keep it in sync with changes introduced in Grakn 1.5.
session.transaction().read();
and session.transaction().write();
client.close();
relationship
> relation
It is relatively common for a user to supply a single address string rather than a list of address. This should be validated early, and the error message should be user-readable.
(this bug only happens sometimes)
I am testing client python with different read queries. Before running into the errors described below, the query was working fine. But after running it twice, I now get the Exceptions below.
Steps to create the smallest reproducible scenario:
from grakn.client import GraknClient, SessionType, TransactionType
client = GraknClient("localhost:1729")
session = client.session("biograkn_covid_16", SessionType.DATA)
tx = session.transaction(TransactionType.READ)
answer_iterator = tx.query().match("match $x isa protein, has uniprot-id $uid; get $uid;")
for answer in answer_iterator:
person = answer.get("uid")
print("Retrieved protein with id " + person.get_iid())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grakn/rpc/stream.py", line 57, in __next__
return next(self)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grakn/rpc/stream.py", line 50, in __next__
res = self._transaction._fetch(self._request_id)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grakn/rpc/transaction.py", line 136, in _fetch
response = next(self._response_iterator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 416, in __next__
return self._next()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 778, in _next
operating = self._call.operate(
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 277, in grpc._cython.cygrpc.IntegratedCall.operate
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 102, in grpc._cython.cygrpc._operate_from_integrated_call
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 110, in grpc._cython.cygrpc._operate_from_integrated_call
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 57, in grpc._cython.cygrpc._raise_call_error_no_metadata
ValueError: Internal gRPC call error 8. Please report to https://github.com/grpc/grpc/issues
answer_iterator = tx.query().match("match $x isa protein, has uniprot-id $uid; get $uid;")
for answer in answer_iterator:
person = answer.get("uid")
print("Retrieved protein with id " + person.get_iid())
And I see this error:
Exception in thread Thread-29:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "src/python/grpcio/grpc/_cython/_cygrpc/thread.pyx.pxi", line 53, in grpc._cython.cygrpc._run_with_context._run
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 1238, in channel_spin
call_completed = event.tag(event)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 166, in handle_event
callbacks = _handle_event(event, state, response_deserializer)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 131, in _handle_event
state.due.remove(operation_type)
KeyError: 5
I expect data to be returned in the console.
The first error returns a ValueError: Internal gRPC call error 8.
, and the second time I am returned with an Exception in thread Thread-29:
After this error, I close both the session and transaction. After I open a new session, I try to open a new transaction. However, this hangs and nothing happens:
Upgrade incompatibility: The same codebase targeting Core 1.5.3 inserts relations correctly but fails to do so when targeting Core 1.5.6.
Steps to create the smallest reproducible scenario:
Both entities and relations are inserted.
Entities and their attributes are inserted but no relations are inserted.
No errors are shown in the server logs. No stack-traces occur client-side.
When calling read_transaction.concepts().get_thing_type("relation")
I get
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'ConceptManager' object has no attribute 'get_thing_type'
Steps to create the smallest reproducible scenario:
from grakn.client import *
client = GraknClient("127.0.0.1:1729")
session = client.session(<myschema>, SessionType.SCHEMA)
tx = session.transaction(TransactionType.READ)
tx.concepts().get_thing_type("relation")
a type object
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'ConceptManager' object has no attribute 'get_thing_type'
six
is a package that provides import statements compatible with both Python 2 and 3. Given we no longer support Python 2 (and in fact use some Python 3-specific language features, such as type hints), we should get rid of six
dependency and replace all imports with their respective Python 3 equivalents.
flyingsilverfin/client-python@989e727c8ef6c8e0ac1de8247b868d21a2515157
I installed grakn-client
but I am getting the following error when I try to run from grakn.client import GraknClient
:
TypeError: Couldn't build proto file into descriptor pool!
Steps to create the smallest reproducible scenario:
pip install grakn-client
from terminal. Installed successfully.from grakn.client import GraknClient
from Jupyter NotebookI expected the module to load without issues.
I received the following error:
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in
----> 1 from grakn.client import GraknClient
~/anaconda/lib/python3.6/site-packages/grakn/client.py in
7 from grakn.service.Keyspace.KeyspaceService import KeyspaceService
8 from grakn.service.Session.TransactionService import TransactionService
----> 9 from grakn_protocol.session.Session_pb2_grpc import SessionServiceStub
10 from grakn.exception.GraknError import GraknError
11
~/anaconda/lib/python3.6/site-packages/grakn_protocol/session/Session_pb2_grpc.py in
2 import grpc
3
----> 4 from grakn_protocol.session import Session_pb2 as session_dot_Session__pb2
5
6
~/anaconda/lib/python3.6/site-packages/grakn_protocol/session/Session_pb2.py in
13
14
---> 15 from grakn_protocol.session import Concept_pb2 as session_dot_Concept__pb2
16 from grakn_protocol.session import Answer_pb2 as session_dot_Answer__pb2
17
In tests, external APIs and internal methods.
When using the Python client to do bulk inserts, I've found that the client is leaking threads (enough that it inevitably crashes the client when the dataset is large enough, i.e. more than a few hundred records). I believe this has to do something with the way I was inserting, which was to catch exceptions when I was adding an entity that had already been added before; due to the way the data I've been given is structured, I was content to eat the cost of discarding duplicate inserts by catching exceptions, but it blows up every time I try it.
This is the inner loop of the code I'm writing (based off of the python phone_calls example):
with GraknClient(uri=f"{host}:{port}") as client:
for section_name in config.csv_inputs:
section = config.csv_inputs[section_name]
path = os.path.join(data_dir,section.file)
with client.session(keyspace=config.grakn.keyspace) as session:
items = parse_data_to_dictionaries(path)
for item in items:
# This is the same structure as the example, funcs returning query strings;
# I'm just returning a list instead of a single query because I have a more
# complex data structure.
graql_insert_queries = templates[section.template](item,section)
for query in graql_insert_queries:
with session.transaction().write() as transaction:
try:
transaction.query(query)
transaction.commit()
except GraknError as e:
print(f"Query failed: {e}")
I track the threads using ps M <pid> | wc -l
. When the queries are not failing the thread count remains steady at the same number of threads as cores; after a few hundred/thousand failed queries, the thread count balloons into the thousands and the python client gives up with cannot create new thread
.
This is the error that gets thrown when it runs out of threads:
Traceback (most recent call last):
File "cli.py", line 64, in <module>
data_loader()
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "cli.py", line 51, in data_loader
with session.transaction().write() as transaction:
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/grakn/client.py", line 106, in write
transaction_service = TransactionService(self._session_id, _TxType.WRITE, self._transaction_rpc_constructor)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 35, in __init__
self._communicator = Communicator(transaction_endpoint)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 133, in __init__
self._response_iterator = grpc_stream_constructor(self)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/grpc/_channel.py", line 683, in __call__
self._request_serializer, event_handler)
File "/Users/XXX/Envs/XXX/lib/python3.7/site-packages/grpc/_channel.py", line 248, in _consume_request_iterator
consumption_thread.start()
File "src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi", line 107, in grpc._cython.cygrpc.ForkManagedThread.start
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 852, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
The client would be more user friendly and faster to interactively work with if all of the classes defined provide a nice __str__()
representation. For instance, a Concept
being printed would show its base type and ID (local information) rather than a memory address, Answers could print the concept maps/list/sets and explanations in string format, transaction could show the type, session could show the keyspace etc.
Manually print out by calling specific methods to retrieve desired information
__str__()
to print object contents betterOur current tests are not CI-friendly because they don't run Grakn. To run them locally, we have to have a Grakn process running in the background.
To run them locally, we have to have a Grakn process running in the background.
Make our tests unzip Grakn, run it, and shut it down when done.
When installing grakn-client, the following message shows up:
ERROR: tensorflow 2.1.0 has requirement protobuf>=3.8.0, but you'll have protobuf 3.6.1 which is incompatible.
ERROR: tensorflow-hub 0.8.0 has requirement protobuf>=3.8.0, but you'll have protobuf 3.6.1 which is incompatible.
ERROR: tensorboard 2.1.1 has requirement grpcio>=1.24.3, but you'll have grpcio 1.24.1 which is incompatible.
ERROR: ray 0.8.5 has requirement protobuf>=3.8.0, but you'll have protobuf 3.6.1 which is incompatible.
Steps to create the smallest reproducible scenario:
no error messages indicating incompatibility
ERROR: tensorflow 2.1.0 has requirement protobuf>=3.8.0, but you'll have protobuf 3.6.1 which is incompatible.
ERROR: tensorflow-hub 0.8.0 has requirement protobuf>=3.8.0, but you'll have protobuf 3.6.1 which is incompatible.
ERROR: tensorboard 2.1.1 has requirement grpcio>=1.24.3, but you'll have grpcio 1.24.1 which is incompatible.
ERROR: ray 0.8.5 has requirement protobuf>=3.8.0, but you'll have protobuf 3.6.1 which is incompatible.
calling GraknClient.core("localhost:1729")
fails
Steps to create the smallest reproducible scenario:
from grakn.client import *
client = GraknClient.core("localhost:1729")
None
AttributeError: type object 'GraknClient' has no attribute 'core'
help(GraknClient)
shows that the 'core' method is indeed missing
When there is an incompatibility between Client Python and the running Grakn Server, the exception thrown by the client seems unrelated to the real cause of the problem. In fact, the error message may even be incorrect, given that the keyspace does exist with the given name.
If encountering this exception for the first time, only searching the web or asking the community can lead the user to the solution.
Have Client Python to identify the incompatibility and throw an exception with a helpful message. e.g. Client Python version 1.5.3 does not support the running Grakn Core server. Please refer to the documentation of client Python to ensure compatibility.
N/A
We are missing getting the direct subtype in the python client concept API.
It is available on the backend Concept API and the , but not in the python (and nodes) concept APIs
//:test-integration
doesn't yet work with RBE. Follow the approach done by @graknlabs_grakn//test-end-to-end/client-java:client-java-e2e
in order to make it work:
//:distribution
so it knows to re-run the test when the distribution is changed in any way.Once the test has been made to work with RBE, change the circleci yml such that //n:test-integration
is executed using the RBE mode:
bazel:
command: bazel ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.