ValueError: generator already executing when multithreading
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- internationalization, localization
Research direction
Start in fluent/runtime/fallback.py, especially format_value and _bundles, and reproduce the reported failure with concurrent calls. Inspect how _bundle_it and _bundle_cache are accessed, then add a regression test for multithreaded formatting; done means concurrent calls no longer raise ValueError: generator already executing.
Written by the indexing model from the issue text.
Description
I run multiple threads and I get the following traceback:
File "...", line ..., in ...:
msg = l10n.format_value('...', {...})
File "/usr/lib/python3.14/site-packages/fluent/runtime/fallback.py", line 41, in format_value
for bundle in self._bundles():
File "/usr/lib/python3.14/site-packages/fluent/runtime/fallback.py", line 61, in _bundles
self._bundle_cache.append(next(self._bundle_it))
ValueError: generator already executing
It seems that the iterator needs to be protected by a lock.
The version I use might be a bit old (see #219), but I checked the latest code on GitHub and the iterator is still unprotected.
- Dominant language
- Python
- Stars
- 245
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from projectfluent/python-fluent
-
Outdated releases Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
projectfluent/python-fluent#219 · 1 comment · 6 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
projectfluent/python-fluent#172 · 1 reaction ·
-
bug fluent.runtime help wanted
Difficulty 3/5 1-2 days Newbie friendliness 35/100
projectfluent/python-fluent#170 · 1 comment ·
-
bug fluent.runtime help wanted
Difficulty 3/5 1-2 days Newbie friendliness 45/100
projectfluent/python-fluent#169 · 3 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
projectfluent/python-fluent#167 ·
All issues in projectfluent/python-fluent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100