Skip to content

Pub/Sub publish error (Invalid value at 'messages[0].data' (TYPE_BYTES)) #247

@niwa-kazutomo

Description

@niwa-kazutomo

Hi,

I use "google_api_python_client-1.5.1" from pip.
I try Pub/Sub message publish to topic.

topics.publish(topic='topicId',
               body={
                     'messages': [{
                                   'messageId': str(uuid.uuid4()),
                                   'data': base64.encodestring('Hello')
                                  }]
                     }).execute()

error occurred, and return this message.

googleapiclient.errors.HttpError: <HttpError 400 when requesting https://pubsub.googleapis.com/v1/projects/projectId/topics/topicId:publish?alt=json returned "Invalid value at 'messages[0].data' (TYPE_BYTES), "SGVsbG8=

I looks like this issue.
googleapis/google-cloud-ruby#713

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions