-
-
Notifications
You must be signed in to change notification settings - Fork 463
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
OSError: [WinError 193] %1 is not a valid Win32 application #671
Comments
same issue here |
I was able to resolve this by removing service = service. It appears the new update has removed the need for service.
Though I'm using chrome. I've seen it mentioned on other issues. |
Same here. Following @jfitzpatrick6 solution worked! |
Yep, same here. @jfitzpatrick6 solution worked for me too! |
Great! Here the solution, it worked! |
Vinyzu
added a commit
to Kaliiiiiiiiii-Vinyzu/CDP-Patches
that referenced
this issue
Aug 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Function executed:
def define_browser(site, show_browser, name_browser="chrome"): if show_browser == False: if name_browser.lower() == "chrome": options = OptionChrome() options.add_argument('--headless') service = Service(ChromeDriverManager().install()) browser = webdriver.Chrome(service=service, options=options) else: options = OptionEdge() options.add_argument('--headless') service = Service(EdgeChromiumDriverManager() .install()) browser = webdriver.Edge(service=service, options=options) else: if browser_name.lower() == "chrome": service = Service(ChromeDriverManager().install()) browser = webdriver.Chrome(service=service)
else:
service = Service(EdgeChromiumDriverManager().install())
browser = webdriver.Edge(service=service)
browser.get(site)
browser.maximize_window()
sleep(2)
return browser
Error returned:
Traceback (most recent call last):
File "c:\Development\Functions.py", line 296, in
browser= define_browser(site_url, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Development\Functions.py", line 156, in define_browser
browser = webdriver.Chrome(service=service)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().init( File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\chromium\webdriver.py" \selenium\webdriver\common\service.py", line 98, in start self._start_process(self._path) File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\common\service.py", line 208, in _start_process self.process = subprocess.Popen(
^^^^^^^^^^^^^^^^ File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\AppData\Local\Programs\Python\Py thon312\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [WinError 193] %1 is not an application Valid Win32
The text was updated successfully, but these errors were encountered: