run_templates crashed with TypeError in _reader(): Can't convert 'bytes' object to str implicitly

Bug #1018354 reported by Benedikt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Undecided
Unassigned
checkbox (Ubuntu)
Fix Released
High
Marc Tardif

Bug Description

Started checkbox. After I entered my password this error appeared. Checkbox continued to work.

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: checkbox 0.14
ProcVersionSignature: Ubuntu 3.5.0-2.2-generic 3.5.0-rc4
Uname: Linux 3.5.0-2-generic i686
ApportVersion: 2.2.5-0ubuntu1
Architecture: i386
Date: Wed Jun 27 14:03:07 2012
ExecutablePath: /usr/share/checkbox/scripts/run_templates
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
InterpreterPath: /usr/bin/python3.2mu
ProcCmdline: python3 /usr/share/checkbox/scripts/run_templates -t -s udev_resource\ |\ filter_templates\ -w\ "category=DISK"
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
PythonArgs: ['/usr/share/checkbox/scripts/run_templates', '-t', '-s', 'udev_resource | filter_templates -w "category=DISK"']
SourcePackage: checkbox
Title: run_templates crashed with TypeError in _reader(): Can't convert 'bytes' object to str implicitly
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
Benedikt (benedikt-klotz) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Daniel Manrique (roadmr) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This is probably related to string encoding, and seems to be a problem in run_templates.

Steps to reproduce:

echo "hello" | /usr/share/checkbox/scripts/run_templates -t -s 'cat /etc/passwd'

Expected result:
hello

Actual result:
Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/run_templates", line 142, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/share/checkbox/scripts/run_templates", line 137, in main
    runner.process(args, options.shell)
  File "/usr/share/checkbox/scripts/run_templates", line 39, in process
    records = self.process_output(process.stdout)
  File "/usr/share/checkbox/scripts/run_templates", line 88, in process_output
    return template.load_file(output)
  File "/usr/lib/python3/dist-packages/checkbox/lib/template.py", line 73, in load_file
    for string in self._reader(file):
  File "/usr/lib/python3/dist-packages/checkbox/lib/template.py", line 35, in _reader
    lines = re.split(delimiter, buffer_old + buffer_new)
TypeError: Can't convert 'bytes' object to str implicitly

I'll set to triaged, importance: high as this is potentially affecting everyone. Thanks!

Changed in checkbox (Ubuntu):
importance: Undecided → High
status: New → Triaged
Daniel Manrique (roadmr)
Changed in checkbox (Ubuntu):
assignee: nobody → Marc Tardif (cr3)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.14.1

---------------
checkbox (0.14.1) quantal-proposed; urgency=low

  * New upstream release (LP: #1018571)

  [Brendan Donegan]
  * Fixed up a few things with the gpu_lockup tests. Removed depends,
    renamed to gpu_lockup_suspend to reflect behaviour and removed the
    requirement on Firefox
  * Changed suspend_advanced and suspend_advanced_auto to use less
    strict definition of fwts s3 test.

  [Javier Collado]
  * Make sure that jobs are topologically ordered (LP: #990075)
  * Keep job ordering as close to whitelist as possible (LP: #1017951)

  [Marc Tardif]
  * New version 0.14.1 for Quantal Quetzal development.
  * jobs/suspend.txt.in: Fixed trailing newline on otherwise empty line.
  * scripts/run_templates: Fixed calls to Popen to use universal_newlines
    to return strings instead of bytes (LP: #1018354)

  [Daniel Manrique]
  * Fixed duplicate suspend/bluetooth_obex_after_suspend job name.
  * scripts/dpkg_resource: Changed encoding from ascii to utf-8 to handle
    non-ascii locales (LP: #1018353)

  [Jeff Lane]
  * Migrated audio/external-HDMI-playback into checkbox. Modified the
    command to match our other audio tests that save and reset mixer
    levels.
 -- Javier Collado <email address hidden> Tue, 26 Jun 2012 16:07:04 +0200

Changed in checkbox (Ubuntu):
status: In Progress → Fix Released
Changed in checkbox:
status: New → 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.