From d88651f457623521f188720bfd60e786d8df086b Mon Sep 17 00:00:00 2001 From: Saumya-Mishra9129 Date: Tue, 23 Jun 2020 00:10:50 +0530 Subject: [PATCH] Fix Gtk Clipboard TypeError add len argument in Gtk.Clipboard set_text method set len=-1 Fixes Error: TypeError: Gtk.Clipboard.set_text() takes exactly 3 arguments (2 given) --- SearchActivity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SearchActivity.py b/SearchActivity.py index 966296d..6a6b745 100644 --- a/SearchActivity.py +++ b/SearchActivity.py @@ -182,7 +182,8 @@ def _write_scores_to_clipboard(self, button=None): scores = '' for i, s in enumerate(self.all_scores): scores += '%s: %s\n' % (str(i + 1), s) - Gtk.Clipboard().set_text(scores) + clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) + clipboard.set_text(scores,-1) # Collaboration-related methods