Convert2RHEL fails with error "UnicodeEncodeError: 'ascii' codec can't encode characters in position 333057-333059: ordinal not in range(128)"

Solution Verified - Updated -

Issue

  • Convert2RHEL is failing with following error-

    2025-01-16T07:22:08+0000] DEBUG - Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/convert2rhel/
    main.py
    ", line 135, in main_locked gather_system_info() File "/usr/lib/python2.7/site-packages/convert2rhel/
    main.py
    ", line 379, in gather_system_info systeminfo.system_info.resolve_system_info() File "/usr/lib/python2.7/site-packages/convert2rhel/
    systeminfo.py
    ", line 175, in resolve_system_info self.generate_rpm_va() File "/usr/lib/python2.7/site-packages/convert2rhel/
    systeminfo.py
    ", line 423, in generate_rpm_va utils.store_content_to_file(output_file, rpm_va) File "/usr/lib/python2.7/site-packages/convert2rhel/utils/__init__.py", line 321, in store_content_to_file handler.write(content) 
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 333057-333059: ordinal not in range(128)
    

Environment

  • CentOS Linux 7, 8
  • Oracle Linux 7, 8, 9
  • Alma Linux OS 8, 9
  • Rocky Linux 8, 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content