This is an automated email from the ASF dual-hosted git repository.
altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 594358e Fix a Py3 error in coders example.
new fa0351c Merge pull request #15125 from tvalentyn/coders_example
594358e is described below
commit 594358efc9c036ed388e837db31e69a969811936
Author: Valentyn Tymofieiev <[email protected]>
AuthorDate: Fri Jul 2 22:27:04 2021 -0700
Fix a Py3 error in coders example.
---
sdks/python/apache_beam/examples/cookbook/coders.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/examples/cookbook/coders.py
b/sdks/python/apache_beam/examples/cookbook/coders.py
index ff54943..cb8d4c2 100644
--- a/sdks/python/apache_beam/examples/cookbook/coders.py
+++ b/sdks/python/apache_beam/examples/cookbook/coders.py
@@ -44,7 +44,7 @@ from apache_beam.options.pipeline_options import SetupOptions
class JsonCoder(object):
"""A JSON coder interpreting each line as a JSON string."""
def encode(self, x):
- return json.dumps(x)
+ return json.dumps(x).encode('utf-8')
def decode(self, x):
return json.loads(x)