← Back to team overview

desktop-packages team mailing list archive

[Bug 1391350] Re: snippet plugin fails when being run in a non-utf8 locale

 

This bug was fixed in the package gedit - 3.10.4-0ubuntu7

---------------
gedit (3.10.4-0ubuntu7) vivid; urgency=medium

  * debian/patches/fix_snippets_encoding.patch: fix encoding issues when
    using the snippets plugin in certain environments. (LP: #1391350)
 -- Marc Deslauriers <marc.deslauriers@xxxxxxxxxx>   Mon, 10 Nov 2014 19:36:20 -0500

** Changed in: gedit (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gedit in Ubuntu.
https://bugs.launchpad.net/bugs/1391350

Title:
  snippet plugin fails when being run in a non-utf8 locale

Status in “gedit” package in Ubuntu:
  Fix Released

Bug description:
  When gedit is run with a non-utf8 locale, for example when being run
  in a quilt shell, the following is spewed on the console:

  Traceback (most recent call last):
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/windowactivatable.py", line 57, in do_activate
      self.accel_group = Library().get_accel_group(None)
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 878, in get_accel_group
      self.ensure(language)
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 912, in ensure
      self.ensure_files()
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 934, in ensure_files
      self.add_system_library)
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 854, in find_libraries
      addcb(f)
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 838, in add_system_library
      return self.add_library(library)
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 794, in add_library
      library.ensure_language()
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 523, in ensure_language
      for element in self.parse_xml(256):
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 467, in parse_xml
      data = f.read(readsize)
    File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1967: ordinal not in range(128)
  Traceback (most recent call last):
    File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/windowactivatable.py", line 71, in do_deactivate
      if self.accel_group:
  AttributeError: 'WindowActivatable' object has no attribute 'accel_group'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1391350/+subscriptions


References