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
Using google.cloud.operation for GAPIC Speech async? #2629
I've been struggling today with the right way to implement this.
I can't seem to make_secure_stub for speech.
This is the error I get...
File "/Users/daspecster/Documents/google/google-cloud-py-2/.tox/py27/lib/python2.7/site-packages/google_cloud_speech-0.20.0.dev0-py2.7.egg/google/cloud/speech/_gax.py", line 92, in async_recognize
OPERATIONS_API_HOST)
File "/Users/daspecster/Documents/google/google-cloud-py-2/.tox/py27/lib/python2.7/site-packages/google_cloud_core-0.20.0-py2.7.egg/google/cloud/_helpers.py", line 642, in make_secure_stub
transport_creds = grpc.ssl_channel_credentials()
AttributeError: 'module' object has no attribute 'ssl_channel_credentials'
@daspecster Yes, gapic-google-longrunning is okay to use, although I plan to merge it into the next release of google-gax (with the same path and module name).
We are also designing a more convenient layer for you to use in the future that will sit on top of the gapic-google-longrunning code. I'll take a look at what you did for Speech, and want to discuss with you what pain points you had.
Activity
daspecster commentedon Oct 27, 2016
This seems to work though.
@bjwatson could something be messing up the
grpcnamespace inAlso, @bjwatson, is
gapic-google-longrunningok to use or is it not really production ready yet?dhermes commentedon Oct 27, 2016
@daspecster It seems like there is an old version of
grpc? Also, you don't needmake_secure_stubfor Speech (not used in Pub/Sub or Logging).There is a "bug" in that we should pass credentials through, but you shouldn't worry about handling it to get Speech in.
daspecster commentedon Oct 27, 2016
@dhermes, Pub/Sub and Logging, don't use
OperationsAFAICT.A channel has to be made in order to make the
OperationStub.https://github.com/GoogleCloudPlatform/python-docs-samples/blob/2da1c09b056798dd54be7106010f9d5610952bef/speech/grpc/transcribe_async.py#L32-L51
I could just do that but that's not very DRY since we have it in
core._helpersright?daspecster commentedon Oct 27, 2016
Fixed with #2632.
bjwatson commentedon Oct 28, 2016
@daspecster Yes,
gapic-google-longrunningis okay to use, although I plan to merge it into the next release ofgoogle-gax(with the same path and module name).We are also designing a more convenient layer for you to use in the future that will sit on top of the
gapic-google-longrunningcode. I'll take a look at what you did for Speech, and want to discuss with you what pain points you had.daspecster commentedon Oct 28, 2016
Ok sure! Thanks @bjwatson!
chore: move samples from python-docs-sample (#66)