> On Jan 10, 2017, at 9:59 AM, Oleg Broytman <p...@phdru.name> wrote:
> 
> On Tue, Jan 10, 2017 at 08:27:21AM -0500, Donald Stufft <don...@python.org> 
> wrote:
>>    python3 -c "import urllib.request,json; 
>> print(json.loads(urllib.request.urlopen('https://www.howsmyssl.com/a/check').read())['tls_version'])"
> 
> Traceback (most recent call last):
>  File "<string>", line 1, in <module>
>  File "/usr/lib/python3.4/json/__init__.py", line 312, in loads
>    s.__class__.__name__))
> TypeError: the JSON object must be str, not ‘bytes'
> 


Huh, just tested, my original snippet works on Python 3.6 but fails on Python 
3.5. 

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to