webdriver.Chrome(options=chrome_options) causes Error

chrome_options = Options()
chrome_options.add_experimental_option(debuggerAddress, 127.0.0.1:9222)
chrome = webdriver.Chrome(options=chrome_options)

causes Error:

JsException(PythonError: Traceback (most recent call last): File “/lib/python3.10/site-packages/_pyodide/_base.py”, line 429, in eval_code .run(globals, locals) File “/lib/python3.10/site-packages/_pyodide/_base.py”, line 300, in run coroutine = eval(self.code, globals, locals) File “”, line 19, in File “”, line 12, in login File “/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py”, line 68, in init service = Service(executable_path, port, service_args, service_log_path) File “/lib/python3.10/site-packages/selenium/webdriver/chrome/service.py”, line 42, in init super(Service, self).init( File “/lib/python3.10/site-packages/selenium/webdriver/chromium/service.py”, line 45, in init service.Service.init(self, executable_path, port=port, env=env, start_error_message=start_error_message) File “/lib/python3.10/site-packages/selenium/webdriver/common/service.py”, line 39, in init self.port = utils.free_port() File “/lib/python3.10/site-packages/selenium/webdriver/common/utils.py”, line 38, in free_port free_socket.listen(5) OSError: [Errno 138] Not supported )

Yeah, you can’t run an external process from a WASM virtual machine…

1 Like

Thanks for replying. Is any solution to this problem??

Run Python normally, not inside PyScript

2 Likes