Bug 1229371 - Using clipboard to paste text fails - set_text() takes exactly 3 arguments (2 given)
Summary: Using clipboard to paste text fails - set_text() takes exactly 3 arguments (2...
Keywords:
Status: CLOSED DUPLICATE of bug 1089695
Alias: None
Product: Fedora
Classification: Fedora
Component: autokey
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raghu Udiyar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-08 14:43 UTC by Christopher Wawak
Modified: 2015-06-08 15:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-08 15:10:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christopher Wawak 2015-06-08 14:43:02 UTC
Description of problem:
When using Autokey-GTK to stick a large bunch of text into the clipboard, I encounter the following error:

2015-06-08 10:00:05,418 DEBUG - iomediator - Send via clipboard
2015-06-08 10:00:05,418 DEBUG - interface - Sending string: u'To join via Browser:\n [...]'
2015-06-08 10:00:05,419 ERROR - interface - Error in X event loop thread
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/autokey/interface.py", line 116, in __eventLoop
    method(*args)
  File "/usr/lib/python2.7/site-packages/autokey/interface.py", line 500, in __sendStringClipboard
    self.__fillClipboard(string)
  File "/usr/lib/python2.7/site-packages/autokey/interface.py", line 537, in __fillClipboard
    self.clipBoard.set_text(string.encode("utf-8"))
TypeError: Gtk.Clipboard.set_text() takes exactly 3 arguments (2 given)

Autokey-gtk generally hangs for a minute or two, and eventually just gives up. 

Version-Release number of selected component (if applicable):
$ rpm -q autokey-gtk
autokey-gtk-0.90.4-6.fc21.noarch

How reproducible:


Steps to Reproduce:
1. Create new phrase that pastes using cardboard. Maybe with multiple lines.
2. Try to use the new phrase.

Actual results:
Autokey-gtk seems to hang for a time, and running debug shows the following error:
TypeError: Gtk.Clipboard.set_text() takes exactly 3 arguments (2 given)

Expected results:
Pastes text.

Additional info:
I replaced line 537 of autokey/interface.py with the following:
            self.clipBoard.set_text(string.encode("utf-8"), len=-1)

It seems to work fine now. It would be great if this could be fixed through a patch to the Feodra RPM, considering there's not been movement on the upstream issue for years.

Existing, stale issue.
https://code.google.com/p/autokey/issues/detail?id=212

Comment 1 Christopher Wawak 2015-06-08 15:10:39 UTC

*** This bug has been marked as a duplicate of bug 1089695 ***


Note You need to log in before you can comment on or make changes to this bug.