RuntimeError: generator raised StopIteration

Open
#95 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start with translate/translate.py:45 and translate/providers/mymemory_translated.py:49, then trace how the provider handles the reported translation input and its matches. Reproduce the traceback and verify that the same translation path completes without RuntimeError after the issue is addressed.

Written by the indexing model from the issue text.

Description

Traceback (most recent call last):
File "...translate\translate.py", line 45, in
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
File "...translate\providers\mymemory_translated.py", line 49, in get_translation
next_best_match = next(match for match in matches)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "...", line 20, in
twitterProcess_1()
File "...", line 18, in twitterProcess_1
print(translator.translate(text))
File "...translate.py", line 45, in translate
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
RuntimeError: generator raised StopIteration

Dominant language
Python
Stars
759
Forks
152
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from terryyin/translate-python

All issues in terryyin/translate-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.