Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script not working with included test epub. #1

Open
Amichayg opened this issue Feb 5, 2022 · 0 comments
Open

Script not working with included test epub. #1

Amichayg opened this issue Feb 5, 2022 · 0 comments

Comments

@Amichayg
Copy link

Amichayg commented Feb 5, 2022

It appears there is a problem with googletrans. Tested on fedora. Attached is the traceback.

Converting book to HTMLZ
Finding translations of new words
Exception in thread Thread-18 (translate_words):
Traceback (most recent call last):
  File "/usr/lib64/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.10/threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "/home/amichaygiuili/Downloads/interlinearize/interlinearize.py", line 320, in translate_words
    ts = translator.translate(words_to_translate, src=src, dest=dest)
  File "/home/amichaygiuili/.local/lib/python3.10/site-packages/googletrans/client.py", line 127, in translate
    translated = self.translate(item, dest=dest, src=src)
  File "/home/amichaygiuili/.local/lib/python3.10/site-packages/googletrans/client.py", line 132, in translate
    data = self._translate(text, dest, src)
  File "/home/amichaygiuili/.local/lib/python3.10/site-packages/googletrans/client.py", line 57, in _translate
    token = self.token_acquirer.do(text)
  File "/home/amichaygiuili/.local/lib/python3.10/site-packages/googletrans/gtoken.py", line 180, in do
    self._update()
  File "/home/amichaygiuili/.local/lib/python3.10/site-packages/googletrans/gtoken.py", line 59, in _update
    code = unicode(self.RE_TKK.search(r.text).group(1)).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'
^CTraceback (most recent call last):
  File "/home/amichaygiuili/Downloads/interlinearize/interlinearize.py", line 568, in <module>
    construct_word_list_from_text(word_list, word_dict, src_lan, dest_lan, service_urls, words_per_request)
  File "/home/amichaygiuili/Downloads/interlinearize/interlinearize.py", line 343, in construct_word_list_from_text
    t_dict = que.get()
  File "/usr/lib64/python3.10/queue.py", line 171, in get
    self.not_empty.wait()
  File "/usr/lib64/python3.10/threading.py", line 320, in wait
    waiter.acquire()
KeyboardInterrupt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant