Skip to content

Commit

Permalink
owtable: Fix an TypeError when using PyQt5
Browse files Browse the repository at this point in the history
`PyQt5.QtCore.QByteArray` raises an TypeError if called with
a `str.
  • Loading branch information
ales-erjavec committed Dec 9, 2016
1 parent ed4dd92 commit cc58931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Orange/widgets/data/owtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit cc58931

Please sign in to comment.