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
(docExtractor) home@home-lnx:~/programs/docExtractor$ python src/syndoc_generator.py -d testing -n 100 --merged_labels
[2020-11-29 00:49:37] Creating train set...
[2020-11-29 00:49:37] Generating random document with seed 0...
Traceback (most recent call last):
File "src/syndoc_generator.py", line 62, in <module>
gen.run(args.nb_train)
File "src/syndoc_generator.py", line 46, in run
d = SyntheticDocument(**kwargs)
File "/home/home/programs/docExtractor/src/utils/__init__.py", line 74, in wrapper
return f(*args, **kw)
File "/home/home/programs/docExtractor/src/synthetic/document.py", line 126, in __init__
self.elements, self.positions = self._generate_random_layout()
File "/home/home/programs/docExtractor/src/utils/__init__.py", line 74, in wrapper
return f(*args, **kw)
File "/home/home/programs/docExtractor/src/synthetic/document.py", line 238, in _generate_random_layout
element = choice(self.available_elements, p=weights)(width, height, **element_kwargs)
File "/home/home/programs/docExtractor/src/synthetic/element.py", line 151, in __init__
self.generate_content(seed=seed)
File "/home/home/programs/docExtractor/src/utils/__init__.py", line 74, in wrapper
return f(*args, **kw)
File "/home/home/programs/docExtractor/src/synthetic/element.py", line 597, in generate_content
self.text, content_width, content_height = self.format_text(text)
File "/home/home/programs/docExtractor/src/synthetic/element.py", line 624, in format_text
text = google(text, src='en', dst='ar')
File "/home/home/anaconda3/envs/docExtractor/lib/python3.6/site-packages/translation/__init__.py", line 19, in google
dst = dst, proxies = proxies)
File "/home/home/anaconda3/envs/docExtractor/lib/python3.6/site-packages/translation/main.py", line 33, in get
if r == '': raise TranslateError('No translation get, you may retry')
translation.exception.TranslateError: No translation get, you may retry
The text was updated successfully, but these errors were encountered:
seekingdeep
changed the title
translation.exception.TranslateError: No translation get, you may retry
[bug] translation.exception.TranslateError: No translation get, you may retry
Nov 28, 2020
Hi @seekingdeep thanks for pointing that out, translation package doesn't seem to work these days and tried other alternatives (googletrans, google_trans_new) but they are not stable yet. I removed the translations for now, so it should work fine, don't hesitate to reopen if not
googletrans seems the more reliable but is currently facing a big issue, I will retry adding translations in a couple of weeks
including translations in languages using different alphabets from the latin one (here arabic and chinese) enables a better generalization power on these particular alphabets
@monniert The error:
Listing the folder's tree:
The text was updated successfully, but these errors were encountered: