sinedie / SRTranslator

SRT files translator
Do What The F*ck You Want To Public License
219 stars 27 forks source link

Weird bug after lang selection on deepl #9

Closed ghost closed 1 year ago

ghost commented 1 year ago

Tried debug it after language selection on deepl, sometimes I get this error there werent anything pasted on deepl

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/toprak/.local/lib/python3.10/site-packages/srtranslator/__main__.py", line 81, in <module>
    srt.translate(translator, args.src_lang, args.dest_lang)
  File "/home/toprak/.local/lib/python3.10/site-packages/srtranslator/srt_file.py", line 138, in translate
    translation = translator.translate(
  File "/home/toprak/.local/lib/python3.10/site-packages/srtranslator/translators/deepl.py", line 104, in translate
    self.input_lang_from.write((clean_text))
  File "/home/toprak/.local/lib/python3.10/site-packages/srtranslator/translators/selenium_utils.py", line 96, in write
    self.element.send_keys(*value)
  File "/home/toprak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py", line 233, in send_keys
    self._execute(
  File "/home/toprak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py", line 410, in _execute
    return self._parent.execute(command, params)
  File "/home/toprak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
    self.error_handler.check_response(response)
  File "/home/toprak/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: Element <d-textarea class="lmt__textarea lmt__source_textarea lmt__textarea_base_style focus-visible-disabled-container"> is not reachable by keyboard
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:182:5
ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:292:5
webdriverSendKeysToElement@chrome://remote/content/marionette/interaction.sys.mjs:624:13
interaction.sendKeysToElement@chrome://remote/content/marionette/interaction.sys.mjs:598:11
sendKeysToElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:506:29
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:146:31