You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_language_bundle examples crash on comment lines in current localization bundles #248
examples/Sync/get_language_bundle.py and examples/Async/get_language_bundle.py build a lookup dict with key, value = line.split("|") on every line of Loc_GER_DE.txt. Current localization bundles contain comment lines with no |, such as # Start Category: Star_Wars_Strategy_RPG, # End Category: ... (65847 strings) and a bare #. The unpack fails on the first of these, so both examples crash.
The library itself is not affected. create_localized_unit_name_dictionary and get_localization_dictionary in helpers/_game_data.py already skip lines that start with # or contain no |, and they split on the first | only. Only the examples are out of date.
Steps to Reproduce
uv run python examples/Sync/get_language_bundle.py
The example uses the default Comlink URL; point it at any public Comlink release.
Expected Behavior
The example builds the German string lookup without errors.
Actual Behavior
Reproduced on develop (9cc3760) against public Comlink spec 0.40.5, localization bundle OBB_J6BeSg-RcgUauXQFYA. Of 72,358 lines, 83 are # comment lines with no |:
ValueError: not enough values to unpack (expected 2, got 1)
Suggested Fix
Skip comment and blank lines, and split on the first | only (line.partition("|")), as the library helper does.
Better still, point readers to get_localization_dictionary, which already handles these lines and has resource limits.
Activity
github-actions commentedon Nov 7, 2026
Addressed by #259, which is now merged into
develop. This issue will close automatically when that change is released tomain.