#1308 runroot returns TypeError in python3
Closed: Fixed 5 years ago by mikem. Opened 5 years ago by jcupova.

run:
koji runroot f29-build-t8or x86_64 echo hello world

result:
[ERROR] koji: TypeError: write() argument must be str, not bytes


I believe this is the full traceback:

Traceback (most recent call last):
  File "/home/mike/Devel/koji/koji/cli2/lkoji", line 310, in <module>
    rv = locals()[command].__call__(options, session, args)
  File "/usr/lib/python3.6/site-packages/koji_cli_plugins/runroot.py", line 101, in handle_runroot
    write_to_stdout(log)
  File "/home/mike/Devel/koji/koji/cli/koji_cli/lib.py", line 352, in write_to_stdout
    sys.stdout.write(contents)
TypeError: write() argument must be str, not bytes

I have a fix here, but I'm still fighting with the unit test.

https://pagure.io/fork/mikem/koji/commits/bytes-to-stdout

Metadata Update from @mikem:
- Issue set to the milestone: 1.17
- Issue tagged with: bug

5 years ago

Metadata Update from @mikem:
- Issue tagged with: testing-ready

5 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-done

5 years ago

Login to comment on this ticket.

Metadata