--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: arista: arista-transcode UnicodeDecodeError
- From: Jérémy Lal <kapouer@melix.org>
- Date: Thu, 01 Aug 2013 19:14:32 +0200
- Message-id: <20130801171432.19146.60679.reportbug@imac.chaumes>
Package: arista
Version: 0.9.7-4
Severity: important
Please find attached a patch (done very quick, you can rewrite it)
that prevents this fatal error when running from arista-transcode :
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/arista/transcoder.py", line 228, in _got_info
self._setup_pass()
File "/usr/lib/python2.7/dist-packages/arista/transcoder.py", line 602, in _setup_pass
(self.acaps.to_string(), aencoder, amux)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128)
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.10.1 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages arista depends on:
ii gnome-icon-theme 3.8.2-2
ii gstreamer0.10-ffmpeg 1:0.10.13-0.2
ii gstreamer0.10-plugins-base 0.10.36-1.1
ii gstreamer0.10-plugins-good 0.10.31-3+nmu1
ii python 2.7.5-2
ii python-cairo 1.8.8-1+b2
ii python-dbus 1.2.0-2
ii python-gconf 2.28.1+dfsg-1
ii python-gobject 3.8.3-1
ii python-gst0.10 0.10.22-3
ii python-gtk2 2.24.0-3+b1
ii python-gudev 147.2-3
ii python-simplejson 2.6.2-1
ii python2.6 2.6.8-2
ii python2.7 2.7.5-6
ii tango-icon-theme 0.8.90-5
Versions of packages arista recommends:
ii gnome-codec-install 0.4.7+nmu2
ii gstreamer0.10-plugins-bad 0.10.23-7.1
ii gstreamer0.10-plugins-really-bad 0.10.23-dmo3
ii gstreamer0.10-plugins-ugly 0.10.19-2+b2
Versions of packages arista suggests:
ii python-notify 0.1.1-3
pn python-webkit <none>
-- no debconf information
-- debsums errors found:
sh: 1: /usr/sbin/dpkg-divert: not found
debsums: changed file /usr/share/pyshared/arista/transcoder.py (from arista package)
Description: Encode strings in utf8
For some reason python chokes on this now.
Author: Jeremy Lal <kapouer@melix.org>
Forwarded: not-needed
Last-Update: 2013-08-01
--- arista-0.9.7.orig/arista/transcoder.py
+++ arista-0.9.7/arista/transcoder.py
@@ -337,7 +337,7 @@ class Transcoder(gobject.GObject):
src = self._get_source()
cmd = "%s %s filesink name=sink " \
- "location=\"%s\"" % (src, mux_str, self.options.output_uri)
+ "location=\"%s\"" % (src, mux_str.encode("utf-8"), self.options.output_uri.encode("utf-8"))
if self.info.is_video and self.preset.vcodec:
# =================================================================
@@ -530,8 +530,8 @@ class Transcoder(gobject.GObject):
cmd += " dmux. ! queue ! ffmpegcolorspace ! videorate !" \
"%s %s %s %s videoscale ! %s ! %s%s ! tee " \
"name=videotee ! queue ! %s" % \
- (deint, vcrop, transform, sub, self.vcaps.to_string(), vbox,
- vencoder, vmux)
+ (deint.encode("utf-8"), vcrop.encode("utf-8"), transform.encode("utf-8"), sub.encode("utf-8"), self.vcaps.to_string().encode("utf-8"), vbox.encode("utf-8"),
+ vencoder.encode("utf-8"), vmux.encode("utf-8"))
if self.info.is_audio and self.preset.acodec and \
self.enc_pass == len(self.preset.vcodec.passes) - 1:
@@ -599,7 +599,7 @@ class Transcoder(gobject.GObject):
cmd += " dmux. ! queue ! audioconvert ! " \
"audiorate tolerance=100000000 ! " \
"audioresample ! %s ! %s ! %s" % \
- (self.acaps.to_string(), aencoder, amux)
+ (self.acaps.to_string().encode("utf-8"), aencoder.encode("utf-8"), amux.encode("utf-8"))
# =====================================================================
# Build the pipeline and get ready!
--- End Message ---