Fix for Python 3

Default for Python 3 is to return byte-objects, not string. This will cause the plugin to fail with an error: "TypeError: a bytes-like object is required, not 'str'".
Fixed by decoding for UTF8.
This commit is contained in:
Kai 2023-02-25 21:49:52 +01:00 committed by Kenyon Ralph
parent 26bcef2f21
commit d628ff5a50
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ else:
auth = urllib.request.HTTPBasicAuthHandler(mgr)
opener = urllib.request.build_opener(auth)
urllib.request.install_opener(opener)
info = urllib.request.urlopen(request).read()
info = urllib.request.urlopen(request).read().decode('utf-8')
data = {}
for line in info.split("\n"):
try: