#1311 py3: incremental_upload fails if fast_upload is off
Closed: Fixed 5 years ago by mikem. Opened 5 years ago by mikem.

if you set use_fast_upload = no in kojid.conf. You'll see:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/koji/daemon.py", line 1296, in runTask
    response = (handler.run(),)
  File "/usr/lib/python3.6/site-packages/koji/tasks.py", line 311, in run
    return koji.util.call_with_argcheck(self.handler, self.params, self.opts)
  File "/usr/lib/python3.6/site-packages/koji/util.py", line 226, in call_with_argcheck
    return func(*args, **kwargs)
  File "/usr/sbin/kojid", line 1302, in handler
    broot.init()
  File "/usr/sbin/kojid", line 539, in init
    rv = self.mock([\'--init\'])
  File "/usr/sbin/kojid", line 481, in mock
    incremental_upload(self.session, fname, fd, uploadpath, logger=self.logger)
  File "/usr/lib/python3.6/site-packages/koji/daemon.py", line 64, in incremental_upload
    data = base64.encodestring(contents)
  File "/usr/lib64/python3.6/base64.py", line 540, in encodestring
    return encodebytes(s)
  File "/usr/lib64/python3.6/base64.py", line 527, in encodebytes
    _input_type_check(s)
  File "/usr/lib64/python3.6/base64.py", line 513, in _input_type_check
    raise TypeError(msg) from err
TypeError: expected bytes-like object, not str

Granted, I don't expect anyone is doing this, but.....


Login to comment on this ticket.

Metadata