From 0e1c492d3ed1429afe87f9ea651753878821b341 Mon Sep 17 00:00:00 2001 From: Andy Nogueira <45477427+andynog@users.noreply.github.com> Date: Mon, 17 Jun 2019 06:51:12 -0400 Subject: [PATCH] docs: missing 'b' in python command (#3728) In Python 3 the command outlined in this doc `import codecs; codecs.decode("YWJjZA==", 'base64').decode('ascii')` throws an error: TypeError: decoding with 'base64' codec failed (TypeError: expected bytes-like object, not str), needs to add 'b' before the encoded string `import codecs; codecs.decode(b"YWJjZA==", 'base64').decode('ascii')` to make it work --- docs/app-dev/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app-dev/getting-started.md b/docs/app-dev/getting-started.md index 9110761e2..eff70db68 100644 --- a/docs/app-dev/getting-started.md +++ b/docs/app-dev/getting-started.md @@ -137,7 +137,7 @@ The result should look like: Note the `value` in the result (`YWJjZA==`); this is the base64-encoding of the ASCII of `abcd`. You can verify this in a python 2 shell by running `"YWJjZA==".decode('base64')` or in python 3 shell by running -`import codecs; codecs.decode("YWJjZA==", 'base64').decode('ascii')`. +`import codecs; codecs.decode(b"YWJjZA==", 'base64').decode('ascii')`. Stay tuned for a future release that [makes this output more human-readable](https://github.com/tendermint/tendermint/issues/1794).