I got an exception when install lektor by the install script
$ curl -sf https://www.getlektor.com/install.sh | sh
...
Traceback (most recent call last):
File "<stdin>", line 142, in <module>
File "<stdin>", 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'
I'm using
$ python --version
Python 3.5.2
Reproduce with traceback of exception
$ python installer.py # extracted from the SH script
Welcome to Lektor
This script will install Lektor on your computer.
Installing at:
bin: /home/hvn/py35env/bin
app: /home/hvn/.local/lib/lektor
Continue? [Yn] y
Traceback (most recent call last):
File "installer.py", line 140, in <module>
main()
File "installer.py", line 128, in main
for url in json.load(urlopen(VENV_URL))['urls']:
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'
A quick workaround to make it work on Python 3
$ diff installer.py orig.py
128c128
< for url in json.loads(urlopen(VENV_URL).read().decode())['urls']:
---
> for url in json.load(urlopen(VENV_URL))['urls']:
I got an exception when install lektor by the install script
I'm using
Reproduce with traceback of exception
A quick workaround to make it work on Python 3
EDIT: this seems related but only fixed in 3.6 http://bugs.python.org/issue10976