4 글 보임 - 1 에서 4 까지 (총 4 중에서)
-
글쓴이글
-
2023년 7월 27일 18:15 #92545
양철웅참가자안녕하세요 인스타봇 첫번쨰 강의 수강중인데
from selenium import webdriver from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome('chromedriver.exe') driver.get('https://instagram.com')
실행 시
Traceback (most recent call last): File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 지정된 파일을 찾을 수 없습니다
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "c:\Users\PC\Desktop\Python Lab\instagram\insta.py", line 5, in <module> driver = webdriver.Chrome('chromedriver.exe') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__ self.service.start() File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\service.py", line 81, in start raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
상기 내용으로 오류가 발생되어 진행이 어렵습니다. 피드백 부탁드려요... ㅠㅠ
2023년 7월 27일 19:11 #92552
codingapple키 마스터chromedriver.exe 파일을 파이썬파일 옆에 두고 driver = webdriver.Chrome() 만 써봅시다
2023년 7월 29일 22:45 #92757
양철웅참가자PS C:\Users\PC\Desktop\Python Lab\instagram> python insta.py Traceback (most recent call last): File "C:\Users\PC\Desktop\Python Lab\instagram\insta.py", line 5, in <module> driver = webdriver.Chrome() ^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in __init__ RemoteWebDriver.__init__( File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile) File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319, in execute response = self.command_executor.execute(driver_command, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374, in execute return self._request(command_info[0], url, body=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397, in _request resp = self._conn.request(method, url, body=body, headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\_request_methods.py", line 118, in request return self.request_encode_body( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\_request_methods.py", line 217, in request_encode_body return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\poolmanager.py", line 432, in urlopen conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\poolmanager.py", line 303, in connection_from_host return self.connection_from_context(request_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\poolmanager.py", line 328, in connection_from_context return self.connection_from_pool_key(pool_key, request_context=request_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\poolmanager.py", line 351, in connection_from_pool_key pool = self._new_pool(scheme, host, port, request_context=request_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\poolmanager.py", line 265, in _new_pool return pool_cls(host, port, **request_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 196, in __init__ timeout = Timeout.from_float(timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\timeout.py", line 190, in from_float return Timeout(read=timeout, connect=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\timeout.py", line 119, in __init__ self._connect = self._validate_timeout(connect, "connect") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\timeout.py", line 156, in _validate_timeout raise ValueError( ValueError: Timeout value connect was <object object at 0x000001F5D2004540>, but it must be an int, float or None. 피드백 주신내용으로 반영하여 실행해도 위와 같은 오류값이 나옵니다..ㅠㅠ
2023년 7월 30일 10:02 #92785
codingapple키 마스터pip uninstall selenium pip install selenium==4.8.2 터미널에 입력해봅시다
-
글쓴이글
4 글 보임 - 1 에서 4 까지 (총 4 중에서)
- 답변은 로그인 후 가능합니다.