Open noembryo opened 6 months ago
Nothing much to add, I have the same issue. Ran on local W11 env.
File "c:\Program Files\Python311\Lib\runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Program Files\Python311\Lib\runpy.py", line 88, in _run_code
exec(code, run_globals)
File "c:\Users\Saya\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy\__main__.py", line 39, in <module>
cli.main()
File "c:\Users\Saya\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main
run()
File "c:\Users\Saya\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "c:\Users\Saya\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\Saya\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "c:\Users\Saya\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "C:\Users\Saya\Documents\deepl-cli-0.5.2\deepl\test_deepl.py", line 4, in <module>
deepl.translate("hello") #=> "こんにちわ"
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Saya\Documents\deepl-cli-0.5.2\deepl\deepl.py", line 86, in translate
return loop.run_until_complete(self.__translate(script))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Saya\Documents\deepl-cli-0.5.2\deepl\deepl.py", line 122, in __translate
await page.goto(f"{url}#{self.fr_lang}/{self.to_lang}/{script}")
File "C:\Users\Saya\AppData\Roaming\Python\Python311\site-packages\playwright\async_api\_generated.py", line 9275, in goto
await self._impl_obj.goto(
File "C:\Users\Saya\AppData\Roaming\Python\Python311\site-packages\playwright\_impl\_page.py", line 484, in goto
return await self._main_frame.goto(**locals_to_params(locals()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Saya\AppData\Roaming\Python\Python311\site-packages\playwright\_impl\_frame.py", line 149, in goto
await self._channel.send("goto", locals_to_params(locals()))
File "C:\Users\Saya\AppData\Roaming\Python\Python311\site-packages\playwright\_impl\_connection.py", line 63, in send
return await self._connection.wrap_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Saya\AppData\Roaming\Python\Python311\site-packages\playwright\_impl\_connection.py", line 495, in wrap_api_call
return await cb()
^^^^^^^^^^
File "C:\Users\Saya\AppData\Roaming\Python\Python311\site-packages\playwright\_impl\_connection.py", line 101, in inner_send
result = next(iter(done)).result()
^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._errors.TargetClosedError: Target page, context or browser has been closed
I am also facing this issue Error:Target page, context or browser has been closed And it happens randomly as well without more details
Latest test fails only on Windows. I don't have a Wnidows environment, can anyone debug this? https://github.com/eggplants/deepl-cli/actions/runs/8888722014
Up until a couple of days ago, I was using v.0.5.2 and everything was OK. The limit for the DeepL to block my IP was ~400.000 characters. From yesterday on, it seems that this limit went down to ~20.000/30.000 characters..
So, I tried to update
deepl-cli
thinking that you might have a fix for this, but I encounter another problem. After installingdeepl-cli
v.0.6.0, and updatedplaywright
library to the latest version (v.1.41.2), I get this error::playwright._impl._errors.TargetClosedError: Target page, context or browser has been closed
.Since I don't see anyone mention anything about it, I have to ask for ideas..
Full traceback: