oliver writes:
> When I run this per email from my work laptop,
>
> python3 -c "import urllib.request,json;
> print(json.loads(urllib.request.urlopen('
> https://www.howsmyssl.com/a/check').read())['tls_version'])"
>
> I get the following traceback:
> ...
> File "c:\Python35\lib\ssl.py", line 633
When I run this per email from my work laptop,
python3 -c "import urllib.request,json;
print(json.loads(urllib.request.urlopen('
https://www.howsmyssl.com/a/check').read())['tls_version'])"
I get the following traceback:
C:\...>python -c "import urllib.request,json;
print(json.loads(urllib.reque
On 10-1-2017 16:01, Donald Stufft wrote:
>> 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.
My guess is that is due to an improvement in 3.6 mentioned here:
https://docs.python.org/3/whatsnew/3.6.html#jso
> On Jan 10, 2017, at 9:59 AM, Oleg Broytman wrote:
>
> On Tue, Jan 10, 2017 at 08:27:21AM -0500, Donald Stufft
> wrote:
>>python3 -c "import urllib.request,json;
>> print(json.loads(urllib.request.urlopen('https://www.howsmyssl.com/a/check').read())['tls_version'])"
>
> Traceback (most
On Tue, Jan 10, 2017 at 08:27:21AM -0500, Donald Stufft
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 "", line 1, in
File "/usr/lib/python3