I can confirm that this bug is also currently present in Ubuntu 13.04
Background:
I've created a simple python script so that AutoKey-GTK can alphabetize lines of selected text I select in a text editor (like gedit). The script is short and this is the entire script:
I ran autokey-gtk in debug mode by typing this command in a terminal:
autokey-gtk -l
When I triggered the script, here's the output that was produced:
2013-10-07 16:48:39,105 DEBUG - service - Script runner executing: Script('Alphabetize Lines')
2013-10-07 16:48:39,105 ERROR - service - Script error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 454, in execute
exec script.code in scope
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/autokey/scripting.py", line 820, in get_selection
self.__execAsync(self.selection.request_text, self.__receive)
File "/usr/lib/python2.7/dist-packages/autokey/scripting.py", line 865, in __execAsync
callback(*args)
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 113, in function
return info.invoke(*args, **kwargs)
TypeError: request_text() takes exactly 3 arguments (2 given)
Exception in thread Phrase-thread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 464, in execute
self.app.notify_error(_("The script '%s' encountered an error") % script.description)
File "/usr/lib/python2.7/dist-packages/autokey/gtkapp.py", line 239, in notify_error
self.notifier.notify_error(message)
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/notifier.py", line 145, in notify_error
self.show_notify(message, Gtk.STOCK_DIALOG_ERROR)
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/notifier.py", line 156, in show_notify
Gdk.threads_enter()
NameError: global name 'Gdk' is not defined
I can confirm that this bug is also currently present in Ubuntu 13.04
Background:
I've created a simple python script so that AutoKey-GTK can alphabetize lines of selected text I select in a text editor (like gedit). The script is short and this is the entire script:
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---
str = clipboard. get_selection( ) send_keys( str)
ary = str.split('\n')
ary.sort()
str = '\n'.join(ary)
keyboard.
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---
Debugging:
I ran autokey-gtk in debug mode by typing this command in a terminal:
autokey-gtk -l
When I triggered the script, here's the output that was produced:
2013-10-07 16:48:39,105 DEBUG - service - Script runner executing: Script('Alphabetize Lines') python2. 7/dist- packages/ autokey/ service. py", line 454, in execute python2. 7/dist- packages/ autokey/ scripting. py", line 820, in get_selection __execAsync( self.selection. request_ text, self.__receive) python2. 7/dist- packages/ autokey/ scripting. py", line 865, in __execAsync python2. 7/dist- packages/ gi/types. py", line 113, in function python2. 7/threading. py", line 810, in __bootstrap_inner python2. 7/threading. py", line 763, in run __target( *self._ _args, **self.__kwargs) python2. 7/dist- packages/ autokey/ service. py", line 464, in execute app.notify_ error(_ ("The script '%s' encountered an error") % script.description) python2. 7/dist- packages/ autokey/ gtkapp. py", line 239, in notify_error notifier. notify_ error(message) python2. 7/dist- packages/ autokey/ gtkui/notifier. py", line 145, in notify_error show_notify( message, Gtk.STOCK_ DIALOG_ ERROR) python2. 7/dist- packages/ autokey/ gtkui/notifier. py", line 156, in show_notify threads_ enter()
2013-10-07 16:48:39,105 ERROR - service - Script error
Traceback (most recent call last):
File "/usr/lib/
exec script.code in scope
File "<string>", line 1, in <module>
File "/usr/lib/
self.
File "/usr/lib/
callback(*args)
File "/usr/lib/
return info.invoke(*args, **kwargs)
TypeError: request_text() takes exactly 3 arguments (2 given)
Exception in thread Phrase-thread:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
Gdk.
NameError: global name 'Gdk' is not defined