Skip to content

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

Closed

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 look like this issue.
googleapis/google-cloud-ruby#713

Activity

  1. added
    api: pubsub
    on Jun 30, 2016
  2. niwa-kazutomo commented on Jul 1, 2016

    @niwa-kazutomo
    Author

    oh, sorry...

  3. added a commit that references this issue on Nov 24, 2025
  4. added a commit that references this issue on Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsub

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions