Skip to content

Commit 38d2c7d

Browse files
author
wonder
committed
Handle non-ascii characters in traceback when showing an exception
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14571 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent cba89c3 commit 38d2c7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def showException(type, value, tb, msg):
2222
msg = QCoreApplication.translate('Python', 'An error has occured while executing Python code:')
2323
txt = '<font color="red">%s</font><br><br>' % msg
2424
for s in lst:
25-
txt += s
25+
txt += s.decode('utf-8', 'replace')
2626
txt += '<br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
2727
txt += '<br>%s<br>%s %s, %s<br><br>' % (QCoreApplication.translate('Python','QGIS version:'), QGis.QGIS_VERSION, QGis.QGIS_RELEASE_NAME, QGis.QGIS_SVN_VERSION)
2828
txt += '%s %s' % (QCoreApplication.translate('Python','Python path:'), str(sys.path))

0 commit comments

Comments
 (0)