Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leapp preupgrade fails with python error #1065

Open
tuxmaster5000 opened this issue Feb 18, 2023 · 3 comments
Open

leapp preupgrade fails with python error #1065

tuxmaster5000 opened this issue Feb 18, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@tuxmaster5000
Copy link

Actual behavior
When I try to convert an CentOS 7.9 to Rocky 8, the preupgrade check fails with an python error

To Reproduce
call leapp preupgrade

Expected behavior
That the tool will present an list of errors or none, when all will be fine

System information (please complete the following information):

  • OS: CentOS 7.9
  • # uname -a Linux XXXX 3.10.0-1160.76.1.el7.x86_64 Add README and initial Cockpit plugin leapp#1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • # rpm -qa "*leapp*" (or shorthashes of commits in case of manual installation):
    leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1.noarch
    leapp-deps-0.14.0-1.el7.noarch
    leapp-0.14.0-1.el7.noarch
    leapp-data-rocky-0.1-6.el7.noarch
    python2-leapp-0.14.0-1.el7.noarch
    leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.1.noarch

Additional context
Python error:

====> * vendor_signed_rpm_scanner
        Provide data about installed RPM Packages signed by Red Hat.
Process Process-290:
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 125, in process
    "Package {} is unsigned, packager: {}, signature: {}".format(pkg.name, pkg.packager, pkg.pgpsig)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 7: ordinal not in range(128)
@tuxmaster5000 tuxmaster5000 added the bug Something isn't working label Feb 18, 2023
@tuxmaster5000
Copy link
Author

As an dirty workaround:
change line 125
from:
Package {} is unsigned, packager: {}, signature: {}".format(pkg.name, pkg.packager, pkg.pgpsig)
to:
Package {} is unsigned, packager: {}, signature: {}".format(pkg.name.encode('ascii', errors='ignore'), pkg.packager.encode('ascii',errors='ignore'), pkg.pgpsig)

@pirat89
Copy link
Member

pirat89 commented Apr 5, 2023

Switching to leapp-repository as leapp is only framework and does not know anything about upgrades.

@pirat89 pirat89 transferred this issue from oamg/leapp Apr 5, 2023
@pirat89
Copy link
Member

pirat89 commented Apr 5, 2023

The same issue could happen for the packager field if using nonsense characters here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants