From a434eb5333c5f05213127e8fb865b5cf5dfbf9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Sun, 19 Nov 2017 12:19:49 +0300 Subject: [PATCH] Update install.sh Fix to avoid "TypeError: the JSON object must be str, not 'bytes'" error while installing. Traceback: curl -sf https://www.getlektor.com/install.sh | sudo sh Welcome to Lektor This script will install Lektor on your computer. Installing at: bin: /usr/local/bin app: /usr/local/lib/lektor Continue? [Yn] y Traceback (most recent call last): File "", line 142, in File "", line 130, in main File "/usr/lib/python3.5/json/__init__.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/lib/python3.5/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes' --- assets/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/install.sh b/assets/install.sh index 18bb8793..90b496f6 100644 --- a/assets/install.sh +++ b/assets/install.sh @@ -146,7 +146,7 @@ if 1: get_confirmation() - for url in json.load(urlopen(VENV_URL))['urls']: + for url in json.loads(urlopen(VENV_URL).read().decode('utf-8'))['urls']: if url['python_version'] == 'source': virtualenv = url['url'] break