Getting unencoded data from Google cloud Pub/Sub instead of base64 : <p>I'm attempting to use the Python library for Pub/Sub, but I keep getting this error: <code>TypeError: Incorrect padding</code>. Some quick googling revealed this issue: <a href="https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2527" rel="nofollow">https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2527</a></p>

<p>However, this doesn't resolve the issue - in fact, printing out the data revealed that the data was not even base64 encoded at all, and setting <code>data = raw_data</code> in the library resolved the issue.</p>

<p>We're sending the message from Java, here is the code we're using:</p>

<pre><code>PCollection&lt;String&gt; userActionsJson = userActionsRaw.apply(ParDo.of(new BigQueryRowToJson()));
       String topicNameFull = "projects/" + options.getProject() + "/topics/" +
               options.getUsersActionsTopicName() + "-" + options.getProduct();
       userActionsJson.apply(PubsubIO.Write.named("PublishToPubSub")
               .topic(topicNameFull));
</code></pre>

<p>however, the same thing happens attempting to send a message through the console.</p>

<p>Has something changed recently to mean that data is no longer base64 encoded?</p>
