#1216 list-pkgs command dies on when printing unicode not in a terminal
Closed: Dropped 2 years ago by jcupova. Opened 5 years ago by mikem.

Works on the terminal:

$ lkoji list-pkgs --tag bad_pkgs
Package                 Tag                     Extra Arches     Owner          
----------------------- ----------------------- ---------------- ---------------
uses.bad¸character      bad_pkgs                                 mikem          
uses.bad¸character3     bad_pkgs                                 mikem          

But fails here:

$ lkoji list-pkgs --tag bad_pkgs|cat
Traceback (most recent call last):
  File "/home/mike/Devel/koji/koji/cli2/lkoji", line 310, in <module>
successfully connected to hub
Package                 Tag                     Extra Arches     Owner          
----------------------- ----------------------- ---------------- ---------------
    rv = locals()[command].__call__(options, session, args)
  File "/home/mike/Devel/koji/koji/cli/koji_cli/commands.py", line 2867, in anon_handle_list_pkgs
    print(fmt % pkg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb8' in position 8: ordinal not in range(128)

This issue is working on py3 correctly. The problem is on python 2.7 only. This issue is 3 years old and nobody else want to this fix. Py2 support should ends with RHEL7 maintenance py2 (June 2024). So, closing this issue as won't fix.

Metadata Update from @jcupova:
- Custom field Size adjusted to None
- Issue close_status updated to: Dropped
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata