Skip to content

Commit dcdf9fb

Browse files
committedOct 7, 2014
[processing] Fixes #11345 - Python error while using Get script from online scripts collection
1 parent 17ca96f commit dcdf9fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎python/plugins/processing/gui/GetScriptsAndModels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ def currentItemChanged(self, item, prev):
159159
helpContent = readUrl(url)
160160
descriptions = json.loads(helpContent)
161161
html = '<h2>%s</h2>' % item.name
162-
html += self.tr('<p><b>Description:</b>%s</p>') % getDescription(ALG_DESC, descriptions)
163-
html += self.tr('<p><b>Created by:</b>%s') % getDescription(ALG_CREATOR, descriptions)
164-
html += self.tr('<p><b>Version:</b>%s') % getDescription(ALG_VERSION, descriptions)
162+
html += self.tr('<p><b>Description:</b> %s</p>') % getDescription(ALG_DESC, descriptions)
163+
html += self.tr('<p><b>Created by:</b> %s') % getDescription(ALG_CREATOR, descriptions)
164+
html += self.tr('<p><b>Version:</b> %s') % getDescription(ALG_VERSION, descriptions)
165165
except HTTPError, e:
166166
html = self.tr('<h2>No detailed description available for this script</h2>')
167167
self.webView.setHtml(html)

‎python/plugins/processing/gui/Help2Html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def getHtmlFromDescriptionsDict(alg, descriptions):
8888

8989
def getDescription(name, descriptions):
9090
if name in descriptions:
91-
return descriptions[name].replace("\n", "<br>")
91+
return unicode(descriptions[name]).replace("\n", "<br>")
9292
else:
9393
return ''
9494

0 commit comments

Comments
 (0)
Please sign in to comment.