UnicodeEncodeError on start

Bug #1622152 reported by Maximiliano Curia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
encuentro
Fix Released
Critical
Unassigned

Bug Description

When launching encuentro from krunner I get:

Traceback (most recent call last):
  File "/usr/bin/encuentro", line 40, in <module>
    from encuentro import main, multiplatform, logger
  File "/usr/share/encuentro/encuentro/__init__.py", line 73, in <module>
    import xdg # NOQA
  File "/usr/share/encuentro/encuentro/__init__.py", line 62, in __exit__
    print(u"Módulo %r importado ok, versión %r" % (self.module, version))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 1: ordinal not in range(128)

In my .xsession-error. When launching it from a terminal encuentro works as expected.

This seems to be due to the way the print function is being used. When launching encuentro without a terminal the output goes directly to xsession-error, which is a "binary" file, so the string needs to be encoded.

I'm attaching a patch to fix this.

Happy hacking,

Revision history for this message
Maximiliano Curia (maxy) wrote :
Changed in encuentro:
importance: Undecided → Critical
Revision history for this message
Facundo Batista (facundo) wrote :

Hola Maximiliano!

Thanks for this report, and the patch!

Fixed this in r299 (using an adapted version of the patch).

Thanks again!

Changed in encuentro:
status: New → Fix Committed
Changed in encuentro:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.