Здравствуйте,попробовал запустить код с инструкции библиотеки arsenic ,а он мне:Не удается найти указанный файл.Подскажите пожалуйста как с этим разобраться,заранее благодарен.
import asyncio
import sys
from arsenic import get_session, keys, browsers, services
async def hello_world():
service = services.Chromedriver(binary="C:\Python39\chromedriver.exe")
browser = browsers.Chrome(chromeOptions={
'args': ['--headless', '--disable-gpu']
})
async with get_session(service, browser) as session:
await session.get('https://images.google.com/')
search_box = await session.wait_for_element(5, 'input[name=q]')
await search_box.send_keys('Cats')
await search_box.send_keys(keys.ENTER)
await asyncio.sleep(10)
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(hello_world())
if __name__ == '__main__':
main()
Traceback (most recent call last):
File "D:\PythonProjects\parsersite\tesy_ansible.py", line 240, in <module>
main()
File "D:\PythonProjects\parsersite\tesy_ansible.py", line 236, in main
loop.run_until_complete(hello_world())
File "C:\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "D:\PythonProjects\parsersite\tesy_ansible.py", line 226, in hello_world
async with get_session(service, browser) as session:
File "C:\Python39\lib\site-packages\arsenic\__init__.py", line 16, in __aenter__
self.session = await start_session(self.service, self.browser, self.bind)
File "C:\Python39\lib\site-packages\arsenic\__init__.py", line 28, in start_session
driver = await service.start()
File "C:\Python39\lib\site-packages\arsenic\services.py", line 105, in start
await self._check_version()
File "C:\Python39\lib\site-packages\arsenic\services.py", line 86, in _check_version
output = await impl.run_process([self.binary, "--version"])
File "C:\Python39\lib\site-packages\arsenic\subprocess.py", line 43, in run_process
process = await asyncio.create_subprocess_exec(
File "C:\Python39\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
File "C:\Python39\lib\asyncio\base_events.py", line 1676, in subprocess_exec
transport = await self._make_subprocess_transport(
File "C:\Python39\lib\asyncio\windows_events.py", line 394, in _make_subprocess_transport
transp = _WindowsSubprocessTransport(self, protocol, args, shell,
File "C:\Python39\lib\asyncio\base_subprocess.py", line 36, in __init__
self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
File "C:\Python39\lib\asyncio\windows_events.py", line 890, in _start
self._proc = windows_utils.Popen(
File "C:\Python39\lib\asyncio\windows_utils.py", line 153, in __init__
super().__init__(args, stdin=stdin_rfd, stdout=stdout_wfd,
File "C:\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Не удается найти указанный файл