Skip to content

PubSub - Error message on subscription.close() #5096

@LaVieEnRoux

Description

@LaVieEnRoux

Python version: 2.7.14
API Client version: 0.33.0

While closing a subscription, the following message is printed to stderr but no exception is thrown:

ERROR:root:Exception serializing message!
Traceback (most recent call last):
  File "/miniconda/lib/python2.7/site-packages/grpc/_common.py", line 87, in _transform
    return transformer(message)
TypeError: descriptor 'SerializeToString' requires a 'google.protobuf.pyext._message.CMessage' object but received a 'UUID'

Recreated by creating a topic+subscription and running the following script:

import google.cloud.pubsub

sub_client = google.cloud.pubsub.SubscriberClient()
sub_name = sub_client.subscription_path('[PROJECT]', '[SUBSCRIPTION]')

sub = sub_client.subscribe(sub_name)
sub.open(lambda x: x.ack())
sub.close()

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions