Leapp preupgrade fails with Actor vendor_signed_rpm_scanner unexpectedly terminated with exit code: 1

Hello everyone!
We are in process of upgrading about 85 CentOS 7 machines to AlmaLInux 9. The process is going OK (albeit slow) but issues I encountered so far (after 12 upgrades) I managed to deal with. However the latest it gives me headaches . Here is the error I get after I run the “leapp preupgrade” command:

====> * vendor_signed_rpm_scanner

  •    Provide data about installed RPM Packages signed by Red Hat.*
    

Process Process-320:
Traceback (most recent call last):

  • File “/usr/lib64/python2.7/multiprocessing/process.py”, line 258, in _bootstrap*
  • self.run()*
  • File “/usr/lib64/python2.7/multiprocessing/process.py”, line 114, in run*
  • self._target(*self._args, *self._kwargs)
  • File “/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py”, line 72, in _do_run*
  • actor_instance.run(*args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/leapp/actors/init.py”, line 290, in run*
  • self.process(args)
  • File “/usr/share/leapp-repository/repositories/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py”, line 146, in process*
  • “Package {} is unsigned, packager: {}, signature: {}”.format(pkg.name, pkg.packager, pkg.pgpsig)*
    UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xa0’ in position 0: ordinal not in range(128)

==========================================================================================================
Actor vendor_signed_rpm_scanner unexpectedly terminated with exit code: 1 - Please check the above details
==========================================================================================================

Debug output written to /var/log/leapp/leapp-preupgrade.log

============================================================

  •                       REPORT*
    

============================================================

A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt

============================================================

  •                   END OF REPORT*
    

============================================================

Note that the leapp-report.txt. is empty. This machine runs Percona software for monitoring Postgress DBs so I don’t believe the error is related to Percona.

Please have a look and let me know if someone ever encountered this error and if there’s a fix/workaround.

Thank you all in advace for your feedback

Cheers,

Emil

1 Like

Hello everyone,
I found the solution for the error [quote=“emilcean, post:1, topic:3722”]
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xa0’ in position 0: ordinal not in range(128)
[/quote]
I post the solution just in case someone else is running into this problem

It seems that Python 2.x has issues processing UTF-8 so I added these lines of code at the top of actor.py

import sys
reload(sys)
sys.setdefaultencoding(‘utf-8’)

That forces python to use uft-8 and solved my problem. I hope it solves yours!

Cheers

1 Like