GNOME Bugzilla – Bug 686619
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2: ordinal not in range(128)" in sessionsaver
Last modified: 2019-03-23 20:50:17 UTC
That's what I get when I start gedit: Traceback (most recent call last):
+ Trace 231077
self._insert_menu()
self._update_session_menu()
_("Recover '%s' session") % session.name,
I'll attach a patch solving the issue. Notice that I wasn't able to test on versions later than 3.4.0 (in Debian testing), but I did verify that that particular code is unchanged in trunk (the patch is against it). See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686361 .
Created attachment 226978 [details] [review] Patch solving the UnicodeDecodeError This patch solves the problem for me.
Review of attachment 226978 [details] [review]: Looks good.
I'm having the exact same problem with Gedit 3.4.1 on Ubutunu 12.04. I've solved the issue by replacing line 86 in /usr/lib/gedit/plugins/sessionsaver/__init__.py from: action = Gtk.Action(action_name, session.name, _("Recover '%s' session") % session.name, "") to: action = Gtk.Action(action_name, session.name, _("Recover '%s' session").decode('utf8') % session.name, "")
Review of attachment 226978 [details] [review]: Tested, works fine.
The session saver plugin has been dropped: http://git.gnome.org/browse/gedit-plugins/commit/?id=7abf46cf9c6e3f12798e813ffeac28e3594167f0
Wow. It's worthwhile to spend time catching a bug, submitting a patch, and then getting to know 4 months later that the plugin has been dropped since 2 month. Is there any way (the commit message doesn't help) to know which bugs motivated the choice? Is there any chance that if those bugs are fixed the plugin will be reintroduced? I ask because this plugin does work great for me (and anyway Debian will apparently include it).
See maybe the bug #616323.
Thanks Sébastien, I did see that... I just assume it was not the reason because it did have a patch submitted (and no negative comments about its last version, or any hints of additional work needed before accepting it).
I'm working on the session saver plugin to restore it into the package gedit-plugins. Help is welcome :) https://github.com/sphax3d/gedit-sessionsaver