chatcontrol drag'n'drop broken
Versions
- OS: Arch Linux
- Gajim version: 0.16.11.1 (built on 30.Oct 2017)
- GTK version: 3.22.25
- Python-nbxmpp version: 0.6.0
Steps to reproduce the problem
- Open Chat Window
- Drag'n'Drop a file onto the main conversation window
Expected behavior
File transfer starts
Actual behavior
Error:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/gajim/chat_control.py", line 1274, in _on_drag_data_received
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
File "/usr/lib/python3.6/site-packages/gajim/common/helpers.py", line 558, in get_file_path_from_dnd_dropped_uri
path = urllib.parse.unquote(uri) # escape special chars
File "/usr/lib/python3.6/urllib/parse.py", line 608, in unquote
if '%' not in string:
TypeError: a bytes-like object is required, not 'str'
Additional Notes
I traced this back to this line in chat_control.py (selection.get_data() returns a bytes-like object instead of a string):
uri = selection.get_data().strip()
uri_splitted = uri.split() # we may have more than one file dropped
Replacing the two lines with this fixes it for me:
uri_splitted = selection.get_uris()