You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incompatible with CPP protobuf implementation for Python #2971
I'm trying to use C++ protobuf implementation for Python since pure Python proto is too slow.
But importing gcloud.bigtable package throws an exception TypeError: Descriptors should not be created directly, but only retrieved from their parent..
Is there any way to fix this problem?
Thanks,
OS type and version
Tested on ubuntu 14.04 / osx 10.12.
Python version and virtual environment information python --version
Python 2.7.6
google-cloud-python version pip show google-cloud, pip show google-<service> or pip freeze
google-cloud 0.22.0 / 0.18.3
Stacktrace if available
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jungho.ahn/pyproto/protobuf/xx/local/lib/python2.7/site-packages/google/cloud/bigtable/__init__.py", line 18, in <module>
from google.cloud.bigtable.client import Client
File "/home/jungho.ahn/pyproto/protobuf/xx/local/lib/python2.7/site-packages/google/cloud/bigtable/client.py", line 33, in <module>
from google.longrunning import operations_grpc
File "/home/jungho.ahn/pyproto/protobuf/xx/local/lib/python2.7/site-packages/google/longrunning/operations_grpc.py", line 47, in <module>
options=None),
File "/home/jungho.ahn/pyproto/protobuf/python/google/protobuf/descriptor.py", line 494, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.
Note that the error is being raised from code in google.longrunning.operations_grpc, which is not maintained in this repository (it is auto-generated from the proto file), which means we won't be able to fix it here.
I think you will need to file an issue there. I looked at the code and it's specifically nested within a if _USE_C_DESCRIPTORS:, and it is not obvious to me what it is supposed to be doing. Sorry. :-(
changed the title [-][Bigtable] Incompatible with CPP protobuf implementation for Python[/-][+]Incompatible with CPP protobuf implementation for Python[/+]on Feb 2, 2017
Activity
dhermes commentedon Jan 28, 2017
@junghoahnsc Can you please try upgrading to
google-cloud, the package moved fromgcloudtogoogle-cloud(a simple rename) after August 2016.Unfortunately, I'm not sure the upgrade will fix the problem, but I want to make sure we're on the same page.
junghoahnsc commentedon Jan 28, 2017
Yes, actually I tried to upgrade to google-cloud 0.22.0, but it showed the same issue.
tseaver commentedon Jan 29, 2017
Note that the error is being raised from code in
google.longrunning.operations_grpc, which is not maintained in this repository (it is auto-generated from the proto file), which means we won't be able to fix it here.@bjwatson, @geigerj can you comment?
dhermes commentedon Jan 30, 2017
@tseaver The error is actually in
protobufitself.junghoahnsc commentedon Jan 30, 2017
Should I file this issue to https://github.com/google/protobuf?
dhermes commentedon Jan 30, 2017
@junghoahnsc Maybe? I'm interested if @bjwatson or @geigerj (or @lukesneeringer) have any insights.
lukesneeringer commentedon Jan 31, 2017
I think you will need to file an issue there. I looked at the code and it's specifically nested within a
if _USE_C_DESCRIPTORS:, and it is not obvious to me what it is supposed to be doing. Sorry. :-(dhermes commentedon Feb 2, 2017
@junghoahnsc Closing out since we can't really offer help. Please post back here if you aren't able to resolve?
[-][Bigtable] Incompatible with CPP protobuf implementation for Python[/-][+]Incompatible with CPP protobuf implementation for Python[/+]lukesneeringer commentedon Feb 28, 2017
This ended up being solved by this pull request in googleapis-common-protos.
move monitoring samples from python-docs-samples (#51)