#1270 Missing conversion from bytes to str
Closed: Fixed 4 years ago by mikem. Opened 4 years ago by tkopecek.

get_source is using Popen.communicate which returnes bytes by default under py3. Exception is then raised when calling urlunsplit on that.

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/koji/daemon.py", line 1294, in runTask
    response = (handler.run(),)
  File "/usr/lib/python3.7/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.7/site-packages/koji/util.py", line 226, in call_with_argcheck
    return func(*args, **kwargs)
  File "koji/builder/kojid", line 4680, in handler
    source = scm.get_source()
  File "/usr/lib/python3.7/site-packages/koji/daemon.py", line 541, in get_source
    r['source'] = urllib.parse.urlunsplit([scheme, netloc, path, query, fragment])
  File "/usr/lib64/python3.7/urllib/parse.py", line 467, in urlunsplit
    _coerce_args(*components))
  File "/usr/lib64/python3.7/urllib/parse.py", line 120, in _coerce_args
    raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1271 Merged 4 years ago