Closed GoogleCodeExporter closed 9 years ago
Good catch... I think though your patch could be simplified somewhat. Instead of
t=str(self.text.toUtf8())
return t.decode("utf-8")
you could probably just
return unicode(self.text)
Original comment by cdekter
on 4 Mar 2011 at 12:20
Original comment by cdekter
on 4 Mar 2011 at 12:21
>you could probably just
>return unicode(self.text)
this work fine ;)
Original comment by ua2...@gmail.com
on 4 Mar 2011 at 12:30
Fixed in v0.71.3
Original comment by cdekter
on 31 Mar 2011 at 10:34
I have a problem that might be related. I am on Ubuntu 10.10 (xfce) and
installed autokey using the ppa. When starting the program I am prompted with
the following message box:
Fatal error starting AutoKey.
'ascii' codec can't encode characters in position 27-28: ordinal not in
range(128)
On the console I see the following output:
Xlib.protocol.request.QueryExtension
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 349, sequence_number =
15, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 349, sequence_number =
16, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 349, sequence_number =
17, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 349, sequence_number =
18, major_opcode = 33, minor_opcode = 0
Xlib.protocol.request.QueryExtension
I previously had an old version of autokey installed, that I obtained by
entering "apt-get install autokey" prior to adding your ppa. Afterwards I
followed the instructions posted somewhere here (uninstalling, adding ppa,
update, install) to upgrade to the current version.
In the old version I created some phrases containing some German umlauts, if
this could be a cause.
Before submitting I realised there is some information in the file
"autokey.log". Here the last few lines:
2012-06-27 17:07:46,483 ERROR - root - Fatal error starting AutoKey: 'ascii'
codec can't encode characters in position 27-28: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/autokey/gtkapp.py", line 78, in __init__
self.initialise(options.configure)
File "/usr/lib/python2.7/dist-packages/autokey/gtkapp.py", line 138, in initialise
self.notifier = get_notifier(self)
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/notifier.py", line 40, in get_notifier
return IndicatorNotifier(app)
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/notifier.py", line 178, in __init__
self.rebuild_menu()
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/notifier.py", line 227, in rebuild_menu
self.menu = popupmenu.PopupMenu(self.app.service, folders, items, False)
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/popupmenu.py", line 63, in __init__
menuItem.set_submenu(PopupMenu(service, folder.folders, folder.items, False))
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/popupmenu.py", line 44, in __init__
items.sort(key=lambda obj: str(obj))
File "/usr/lib/python2.7/dist-packages/autokey/gtkui/popupmenu.py", line 44, in <lambda>
items.sort(key=lambda obj: str(obj))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 27-28:
ordinal not in range(128)
Best regards,
Peter
PS: I hope I did not hijack this bugreport... If so -- sorry!
Original comment by Peter.Pl...@gmail.com
on 27 Jun 2012 at 3:09
I was curious and deleted the folder "data". Afterwards autokey starts as
expected. So it must have something to do with one of the phrases I entered in
the old version...
Original comment by Peter.Pl...@gmail.com
on 27 Jun 2012 at 3:14
So I did not stop...
The culprit was the file ".folder.json" inside the folder "My Phrases". Here is
the unified diff:
diff -u .folder.json .folder.new.json
--- .folder.json 2012-06-27 16:46:00.000000000 +0200
+++ .folder.new.json 2012-06-27 17:12:36.000000000 +0200
@@ -1,10 +1,8 @@
{
- "usageCount": 8,
+ "usageCount": 0,
"abbreviation": {
"wordChars": "[\\w]",
- "abbreviations": [
- null
- ],
+ "abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
@@ -25,5 +23,5 @@
"isRecursive": false
},
"type": "folder",
- "showInTrayMenu": true
+ "showInTrayMenu": false
}
Cheers!
Thank you for the nice program!
Original comment by Peter.Pl...@gmail.com
on 27 Jun 2012 at 3:22
Original issue reported on code.google.com by
ua2...@gmail.com
on 4 Mar 2011 at 11:00Attachments: