diff --git a/src/calibre/library/cli.py b/src/calibre/library/cli.py index 2a3e58f99b..d5eea9696e 100644 --- a/src/calibre/library/cli.py +++ b/src/calibre/library/cli.py @@ -42,7 +42,7 @@ def do_list(db, fields, sort_by, ascending, search_text): widths = list(map(lambda x : 0, fields)) for i in db.data: for j, field in enumerate(fields): - widths[j] = max(widths[j], len(unicode(i[field]))) + widths[j] = max(widths[j], len(unicode(i[str(field)]))) screen_width = terminal_controller.COLS if not screen_width: