Incompatible API problem in simple.py?

Moved from GitHub pydgraph/107

Posted by zealot-shin:

with dgraph version 1.1.0 and pydgraph version 2.0.2,:

dgraph version

[Decoder]: Using assembly version of decoder

Dgraph version : v1.1.0
Dgraph SHA-256 : 7d4294a80f74692695467e2cf17f74648c18087ed7057d798f40e1d3a31d2095
Commit SHA-1 : ef7cdb28
Commit timestamp : 2019-09-04 00:12:51 -0700
Branch : HEAD
Go version : go1.12.7

For Dgraph official documentation, visit https://docs.dgraph.io.
For discussions about Dgraph , visit http://discuss.dgraph.io.
To say hi to the community , visit https://dgraph.slack.com.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2018 Dgraph Labs, Inc.

pip3 list

Package Version


grpcio 1.25.0
grpcio-tools 1.25.0
pip 18.1
protobuf 3.11.1
pydgraph 2.0.2
setuptools 40.6.2
six 1.13.0

when I ran codes in simple.py, still got the error:

schema = “”"
… type Person {
name
friend
age
married
loc
dob
}
“”"… … … … … … … …

client.alter(pydgraph.Operation(schema=schema))
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.6/site-packages/pydgraph/client.py”, line 87, in alter
raise error
File “/usr/local/lib/python3.6/site-packages/pydgraph/client.py”, line 78, in alter
credentials=credentials)
File “/usr/local/lib/python3.6/site-packages/pydgraph/client_stub.py”, line 46, in alter
credentials=credentials)
File “/usr/local/lib/python3.6/site-packages/grpc/_channel.py”, line 690, in call
return _end_unary_response_blocking(state, call, False, None)
File “/usr/local/lib/python3.6/site-packages/grpc/_channel.py”, line 592, in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = “line 3 column 12: Missing colon in type declaration. Got
"
debug_error_string = “{“created”:”@1576733760.865447033”,“description”:“Error received from peer ipv4:127.0.0.1:9080”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1055,“grpc_message”:“line 3 column 12: Missing colon in type declaration. Got \n”,“grpc_status”:2}"

I’m wondering if this is imcompatible API problem caused by versions I’m using.

zealot-shin commented :

after upgrade dgraph to version 1.1.1, problem vanished.