Skip to content

Commit

Permalink
Fix: no current event loop in thread(#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin-jun-xiang committed Sep 27, 2023
1 parent 25b8ee8 commit 0df56a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [French](README.French.md)
* [Arabic](README.Arabic.md)

test

# Introduction

Expand Down
4 changes: 2 additions & 2 deletions translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def multi_exec(output_lang: str):
try:
with ThreadPool(10) as pool:
pool.map(multi_exec, LAGNS)
except RuntimeError as e:
except Exception as e:
# Use single thread if multithread have some problem
print(e)
print('Thread Wrong:', e)
[multi_exec(output_lang) for output_lang in LAGNS]


Expand Down

0 comments on commit 0df56a3

Please sign in to comment.