#1215 queryHistory errors on unicode package name filter
Opened 8 months ago by mikem. Modified 8 months ago

If you query history for a package name with unicode characters, the hub function does not handle the value well and raises a Fault.


$ koji list-history --package 'köji' --after 2019-01-01
2019-01-28 09:55:27,983 [DEBUG] koji: Opening new requests session
successfully connected to hub
Traceback (most recent call last):
  File "/home/mike/Devel/koji/koji/cli2/koji", line 310, in <module>
    rv = locals()[command].__call__(options, session, args)
  File "/home/mike/Devel/koji/koji/cli/koji_cli/commands.py", line 4275, in anon_handle_list_history
    histdata = session.queryHistory(tables=tables, **kwargs)
  File "/home/mike/Devel/koji/koji/koji/__init__.py", line 2023, in __call__
    return self.__func(self.__name, args, opts)
  File "/home/mike/Devel/koji/koji/koji/__init__.py", line 2504, in _callMethod
    raise err
xmlrpclib.Fault: <Fault 1: "<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\\xf6' in position 1: ordinal not in range(128)">

For the sake of reproducing this, it doesn't matter if the package exists in the system or not. The error happen while constructing the query options.

Login to comment on this ticket.