From ac721d33446d301e9abacbc718c1adacf2ad8b6a Mon Sep 17 00:00:00 2001 From: nirvn Date: Thu, 24 Nov 2016 12:58:07 +0700 Subject: [PATCH] [processing] python3/pyqt5 fixes for get scripts and models dialog --- python/plugins/processing/gui/GetScriptsAndModels.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/plugins/processing/gui/GetScriptsAndModels.py b/python/plugins/processing/gui/GetScriptsAndModels.py index cddc2ca0027..d1adb7d27df 100644 --- a/python/plugins/processing/gui/GetScriptsAndModels.py +++ b/python/plugins/processing/gui/GetScriptsAndModels.py @@ -194,8 +194,8 @@ class GetScriptsAndModelsDialog(BASE, WIDGET): if reply.error() != QNetworkReply.NoError: self.popupError(reply.error(), reply.request().url().toString()) else: - resources = str(reply.readAll()).splitlines() - resources = [r.split(',') for r in resources] + resources = bytes(reply.readAll()).decode('utf8').splitlines() + resources = [r.split(',', 2) for r in resources] self.resources = {f: (v, n) for f, v, n in resources} reply.deleteLater() @@ -242,7 +242,7 @@ class GetScriptsAndModelsDialog(BASE, WIDGET): if reply.error() != QNetworkReply.NoError: html = self.tr('

No detailed description available for this script

') else: - content = str(reply.readAll()) + content = bytes(reply.readAll()).decode('utf8') descriptions = json.loads(content) html = '

%s

' % item.name html += self.tr('

Description: %s

') % getDescription(ALG_DESC, descriptions) @@ -287,7 +287,7 @@ class GetScriptsAndModelsDialog(BASE, WIDGET): self.popupError(reply.error(), reply.request().url().toString()) content = None else: - content = reply.readAll() + content = bytes(reply.readAll()).decode('utf8') reply.deleteLater() if content: