Bug 2322650 - langtable.py:251:characters:TypeError: unsupported operand type(s) for +: 'LanguagesContentHandler' and 'str'
Summary: langtable.py:251:characters:TypeError: unsupported operand type(s) for +: 'La...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: langtable
Version: 41
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mike FABIAN
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:2104e017c1f2c288e17f5fafa61...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-30 02:03 UTC by computer_nerd3
Modified: 2025-09-22 02:44 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-09-22 02:44:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (719 bytes, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details
File: environ (869 bytes, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details
File: mountinfo (4.65 KB, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details
File: open_fds (892 bytes, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details
File: namespaces (171 bytes, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details
File: cpuinfo (3.25 KB, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details
File: backtrace (1.98 KB, text/plain)
2024-10-30 02:03 UTC, computer_nerd3
no flags Details

Description computer_nerd3 2024-10-30 02:03:22 UTC
Version-Release number of selected component:
anaconda-core-41.35-2.fc41



Additional info:
kernel:         6.11.5-300.fc41.x86_64
cmdline:        python3 -m pyanaconda.modules.localization
cgroup:         0::/user.slice/user-0.slice/session-4.scope
uid:            0
reason:         langtable.py:251:characters:TypeError: unsupported operand type(s) for +: 'LanguagesContentHandler' and 'str'
executable:     /usr/lib64/python3.13/site-packages/pyanaconda/modules/localization/__main__.py
type:           Python3
package:        anaconda-core-41.35-2.fc41
runlevel:       unknown
exception_type: TypeError
crash_function: characters
interpreter:    python3-3.13.0-1.fc41.x86_64

Comment 1 computer_nerd3 2024-10-30 02:03:25 UTC
Created attachment 2054293 [details]
File: os_info

Comment 2 computer_nerd3 2024-10-30 02:03:27 UTC
Created attachment 2054294 [details]
File: environ

Comment 3 computer_nerd3 2024-10-30 02:03:33 UTC
Created attachment 2054295 [details]
File: mountinfo

Comment 4 computer_nerd3 2024-10-30 02:03:34 UTC
Created attachment 2054296 [details]
File: open_fds

Comment 5 computer_nerd3 2024-10-30 02:03:35 UTC
Created attachment 2054297 [details]
File: namespaces

Comment 6 computer_nerd3 2024-10-30 02:03:37 UTC
Created attachment 2054298 [details]
File: cpuinfo

Comment 7 computer_nerd3 2024-10-30 02:03:38 UTC
Created attachment 2054299 [details]
File: backtrace

Comment 8 Martin Kolman 2024-10-31 13:15:45 UTC
Looking at the traceback, this looks like some logic issue in the langtable library:


langtable.py:251:characters:TypeError: unsupported operand type(s) for +: 'LanguagesContentHandler' and 'str'

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/localization/__main__.py", line 23, in <module>
    from pyanaconda.modules.localization.localization import LocalizationService
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/localization/localization.py", line 20, in <module>
    import langtable
  File "/usr/lib/python3.13/site-packages/langtable/__init__.py", line 1, in <module>
    from .langtable import *
  File "/usr/lib/python3.13/site-packages/langtable/langtable.py", line 2719, in <module>
    __module_init = __ModuleInitializer()
  File "/usr/lib/python3.13/site-packages/langtable/langtable.py", line 2714, in __init__
    _init()
    ~~~~~^^
  File "/usr/lib/python3.13/site-packages/langtable/langtable.py", line 2705, in _init
    _read_file('languages.xml', LanguagesContentHandler())
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/langtable/langtable.py", line 954, in _read_file
    _expat_parse(file, sax_handler)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/langtable/langtable.py", line 934, in _expat_parse
    parser.ParseFile(file)
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/builddir/build/BUILD/python3.13-3.13.0-build/Python-3.13.0/Modules/pyexpat.c", line 286, in CharacterData
  File "/usr/lib/python3.13/site-packages/langtable/langtable.py", line 251, in characters
    new_value = old_value + content
                ~~~~~~~~~~^~~~~~~~~
TypeError: unsupported operand type(s) for +: 'LanguagesContentHandler' and 'str'

Local variables in innermost frame:
self: <langtable.langtable.LanguagesContentHandler object at 0x7fb79428b8c0>
content: '1000'
old_value: <langtable.langtable.LanguagesContentHandler object at 0x7fb79428b8c0>


So reassigning to the langtable component.

Comment 9 Mike FABIAN 2025-07-21 07:29:16 UTC
I cannot reproduce this.

Is this still reproducible on Fedora 42? How?


Note You need to log in before you can comment on or make changes to this bug.