run_templates crashed with TypeError in _reader(): Can't convert 'bytes' object to str implicitly
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
ProcVersionSign
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/
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
InterpreterPath: /usr/bin/
ProcCmdline: python3 /usr/share/
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, no user)
LANG=de_DE.UTF-8
PythonArgs: ['/usr/
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
- Daniel Manrique (community): Approve
-
Diff: 50 lines (+8/-3)3 files modifieddebian/changelog (+3/-0)
jobs/suspend.txt.in (+1/-1)
scripts/run_templates (+4/-2)
tags: | removed: need-duplicate-check |
Changed in checkbox (Ubuntu): | |
assignee: | nobody → Marc Tardif (cr3) |
status: | Triaged → In Progress |
Changed in checkbox: | |
status: | New → Fix Released |
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: checkbox/ scripts/ run_templates" , line 142, in <module> exit(main( sys.argv[ 1:])) checkbox/ scripts/ run_templates" , line 137, in main process( args, options.shell) checkbox/ scripts/ run_templates" , line 39, in process output( process. stdout) checkbox/ scripts/ run_templates" , line 88, in process_output load_file( output) python3/ dist-packages/ checkbox/ lib/template. py", line 73, in load_file python3/ dist-packages/ checkbox/ lib/template. py", line 35, in _reader
Traceback (most recent call last):
File "/usr/share/
sys.
File "/usr/share/
runner.
File "/usr/share/
records = self.process_
File "/usr/share/
return template.
File "/usr/lib/
for string in self._reader(file):
File "/usr/lib/
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!