sinedie/SRTranslator

Failed to execute script 'SRTranslator' due to unhandled exception

kvalle22 opened this issue · 4 comments

... Translating chunk. 0 %
Traceback (most recent call last):
  File "SRTranslator.py", line 47, in <module>
  File "SRTranslator.py", line 15, in translate_with_retry
  File "srtranslator\srt_file.py", line 154, in translate
  File "srtranslator\translators\deepl_scrap.py", line 140, in translate
  File "srtranslator\translators\selenium_utils.py", line 111, in write
  File "selenium\webdriver\common\action_chains.py", line 78, in perform
  File "selenium\webdriver\common\actions\action_builder.py", line 91, in perform
  File "selenium\webdriver\remote\webdriver.py", line 444, in execute
  File "selenium\webdriver\remote\errorhandler.py", line 249, in check_response
selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: (542, -46) is out of bounds of viewport width (1093) and height (530)
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:187:5
MoveTargetOutOfBoundsError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:473:5
assertInViewPort@chrome://remote/content/shared/webdriver/Actions.sys.mjs:2119:11
dispatch@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1016:21
dispatch/pendingEvents<@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1833:14
dispatch@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1832:39
dispatch/chainEvents<@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1758:27
dispatch@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1760:7
performActions@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:503:23
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:145:31

[21800] Failed to execute script 'SRTranslator' due to unhandled exception!

I'm getting this error constantly when trying to translate .srt files from english to spanish

any help would be greatly appreciated

Can you try using the -S flag and see if the window get fullscreen?

seems like it's working now! thanks
image

but how can add arguments, in this case '-s', if I am trying to use the example in https://github.com/sinedie/SRTranslator/blob/master/examples/recursive_folder.py

In that case you could use this

os.environ.pop("MOZ_HEADLESS")

But ok... close it when you are for sure it is fixed.