#847 Pungi crashes when using python3
Closed: Fixed 6 years ago Opened 6 years ago by puiterwijk.

I had initially filed this as a Kobo bug, but they are pointing to the caller, so let's see whether it's a Pungi bug: With pungi 4.1.21 which switched to python3, I got the following exception:

Traceback (most recent call last):
  File "/usr/bin/pungi-koji", line 468, in <module>
    main()
  File "/usr/bin/pungi-koji", line 254, in main
    run_compose(compose, create_latest_link=create_latest_link, latest_link_status=latest_link_status)
  File "/usr/bin/pungi-koji", line 362, in run_compose
    init_phase.start()
  File "/usr/lib/python3.6/site-packages/pungi/phases/base.py", line 64, in start
    self.run()
  File "/usr/lib/python3.6/site-packages/pungi/phases/init.py", line 41, in run
    write_global_comps(self.compose)
  File "/usr/lib/python3.6/site-packages/pungi/phases/init.py", line 84, in write_global_comps
    get_file_from_scm(scm_dict, tmp_dir, logger=compose._logger)
  File "/usr/lib/python3.6/site-packages/pungi/wrappers/scm.py", line 249, in get_file_from_scm
    scm.export_file(scm_repo, i, scm_branch=scm_branch, target_dir=tmp_dir)
  File "/usr/lib/python3.6/site-packages/pungi/wrappers/scm.py", line 147, in export_file
    self.run_process_command(tmp_dir)
  File "/usr/lib/python3.6/site-packages/pungi/wrappers/scm.py", line 48, in run_process_command
    universal_newlines=True)
  File "h", line 326, in run
    lines = proc.stdout.read(buffer_size)
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
Frame decode in /usr/lib64/python3.6/encodings/ascii.py at line 26
<CODE>

Kobo bug was filed at: https://github.com/release-engineering/kobo/issues/55


Example crashed compose: https://kojipkgs.fedoraproject.org/compose/updates/Fedora-Epel-6-updates-testing-20180217.0/.

Our current workaround is to modify /bin/pungi-koji to be #!/bin/python2

This should be fixed in #849.

I would recommend modifying the config to run make comps-el6.xml which would be a bit faster.

Metadata Update from @onosek:
- Issue tagged with: 4.1.23

6 years ago

Login to comment on this ticket.

Metadata