From cc589319797d51052db9913b5749d683147e5438 Mon Sep 17 00:00:00 2001 From: Ales Erjavec Date: Fri, 9 Dec 2016 12:38:56 +0100 Subject: [PATCH] owtable: Fix an TypeError when using PyQt5 `PyQt5.QtCore.QByteArray` raises an TypeError if called with a `str. --- Orange/widgets/data/owtable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Orange/widgets/data/owtable.py b/Orange/widgets/data/owtable.py index 7699ef6f624..d02fe79b764 100644 --- a/Orange/widgets/data/owtable.py +++ b/Orange/widgets/data/owtable.py @@ -320,8 +320,8 @@ def table_selection_to_mime_data(table): """ lines = table_selection_to_list(table) - csv = lines_to_csv_string(lines, dialect="excel") - tsv = lines_to_csv_string(lines, dialect="excel-tab") + csv = lines_to_csv_string(lines, dialect="excel").encode("utf-8") + tsv = lines_to_csv_string(lines, dialect="excel-tab").encode("utf-8") mime = QMimeData() mime.setData("text/csv", QByteArray(csv))