Bug#940987: rdetails fails: TypeError: sequence item 0: expected str instance, bytes found
Package: apt-xapian-index
Version: 0.50
Severity: important
Hi,
Trying to issue axi-cache rdetails fails:
% axi-cache rdetails apt-xapian-index
Traceback (most recent call last):
File "/usr/bin/axi-cache", line 861, in <module>
sys.exit(ui.perform())
File "/usr/bin/axi-cache", line 852, in perform
return f(self.args)
File "/usr/bin/axi-cache", line 718, in do_rdetails
print(name, tag, " ".join(deps))
TypeError: sequence item 0: expected str instance, bytes found
It seems the query is returning bytes instead of strings. Converting
with utf-8 makes it work (but I have no idea if this fix is correct):
deps = map(lambda x: x.decode('utf-8'), db.get_rdeps(name, pfx))
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.2.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages apt-xapian-index depends on:
ii python3 3.7.3-1
ii python3-apt 1.8.4
ii python3-debian 0.1.36
ii python3-xapian 1.4.12-2
apt-xapian-index recommends no packages.
Versions of packages apt-xapian-index suggests:
ii python3-xdg 0.25-5
-- no debconf information
Reply to: