Open StatguyUser opened 1 month ago
Hi, Thank you for your feedback. I'm aware that the project has some issues, and I'm currently working on improvements. In the near future, I will release a new version that will fix the bugs and introduce some new features.
I passed my credential
And after i execute this cell, i am getting below error. Can anyone help on this please?
`Last version of chromedriver is already installed.
SessionNotCreatedException Traceback (most recent call last) File ~\AppData\Roaming\Python\Python312\site-packages\chatgpt_automation\chatgpt_automation.py:287, in ChatGPTAutomation.setup_webdriver(self, port) 286 # Initializing the Chrome WebDriver with the specified options --> 287 driver = webdriver.Chrome(self.chrome_driver_path, options=chrome_options) 288 return driver
File ~\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\chrome\webdriver.py:84, in WebDriver.init(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive) 82 service.path = DriverFinder.get_path(service, options) ---> 84 super().init( 85 DesiredCapabilities.CHROME["browserName"], 86 "goog", 87 port, 88 options, 89 service_args, 90 desired_capabilities, 91 service_log_path, 92 service, 93 keep_alive, 94 )
File ~\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\chromium\webdriver.py:104, in ChromiumDriver.init(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive) 103 try: --> 104 super().init( 105 command_executor=ChromiumRemoteConnection( 106 remote_server_addr=self.service.service_url, 107 browser_name=browser_name, 108 vendor_prefix=vendor_prefix, 109 keep_alive=keep_alive, 110 ignore_proxy=_ignore_proxy, 111 ), 112 options=options, 113 ) 114 except Exception:
File ~\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\webdriver.py:286, in WebDriver.init(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options) 285 self.start_client() --> 286 self.start_session(capabilities, browser_profile)
File ~\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\webdriver.py:378, in WebDriver.start_session(self, capabilities, browser_profile) 377 parameters = {"capabilities": w3c_caps} --> 378 response = self.execute(Command.NEW_SESSION, parameters) 379 if "sessionId" not in response:
File ~\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\webdriver.py:440, in WebDriver.execute(self, driver_command, params) 439 if response: --> 440 self.error_handler.check_response(response) 441 response["value"] = self._unwrap_value(response.get("value", None))
File ~\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\errorhandler.py:245, in ErrorHandler.check_response(self, response) 244 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here --> 245 raise exception_class(message, screen, stacktrace)
SessionNotCreatedException: Message: session not created: cannot connect to chrome at 127.0.0.1:56580 from chrome not reachable Stacktrace: GetHandleVerifier [0x00007FF7FE949412+29090] (No symbol) [0x00007FF7FE8BE239] (No symbol) [0x00007FF7FE77B009] (No symbol) [0x00007FF7FE7676D4] (No symbol) [0x00007FF7FE7BC558] (No symbol) [0x00007FF7FE7B162B] (No symbol) [0x00007FF7FE80233D] (No symbol) [0x00007FF7FE8019F0] (No symbol) [0x00007FF7FE7F6493] (No symbol) [0x00007FF7FE7C09D1] (No symbol) [0x00007FF7FE7C1B31] GetHandleVerifier [0x00007FF7FEC6871D+3302573] GetHandleVerifier [0x00007FF7FECB4243+3612627] GetHandleVerifier [0x00007FF7FECAA417+3572135] GetHandleVerifier [0x00007FF7FEA05EB6+801862] (No symbol) [0x00007FF7FE8C945F] (No symbol) [0x00007FF7FE8C4FB4] (No symbol) [0x00007FF7FE8C5140] (No symbol) [0x00007FF7FE8B461F] BaseThreadInitThunk [0x00007FFE79E47374+20] RtlUserThreadStart [0x00007FFE7BD3CC91+33]
During handling of the above exception, another exception occurred:
WebDriverException Traceback (most recent call last) Cell In[5], line 1 ----> 1 chat_bot = ChatGPTAutomation( 2 username="statsproduct@gmail.com", # Optional 3 password="a1b9c7d4@" # Optional 4 )
File ~\AppData\Roaming\Python\Python312\site-packages\chatgpt_automation\chatgpt_automation.py:128, in ChatGPTAutomation.init(self, chrome_path, chrome_driver_path, username, password, user_data_dir) 126 self.launch_chrome_with_remote_debugging(free_port, self.url) 127 # self.wait_for_human_verification() --> 128 self.driver = self.setup_webdriver(free_port) 130 self.username = username 131 self.password = password
File ~\AppData\Roaming\Python\Python312\site-packages\chatgpt_automation\chatgpt_automation.py:293, in ChatGPTAutomation.setup_webdriver(self, port) 291 logging.error(f"Failed to initialize WebDriver: {e}") 292 # Raising a WebDriverException to indicate failure in WebDriver setup --> 293 raise WebDriverException(f"Error initializing WebDriver: {e}")
WebDriverException: Message: Error initializing WebDriver: Message: session not created: cannot connect to chrome at 127.0.0.1:56580 from chrome not reachable Stacktrace: GetHandleVerifier [0x00007FF7FE949412+29090] (No symbol) [0x00007FF7FE8BE239] (No symbol) [0x00007FF7FE77B009] (No symbol) [0x00007FF7FE7676D4] (No symbol) [0x00007FF7FE7BC558] (No symbol) [0x00007FF7FE7B162B] (No symbol) [0x00007FF7FE80233D] (No symbol) [0x00007FF7FE8019F0] (No symbol) [0x00007FF7FE7F6493] (No symbol) [0x00007FF7FE7C09D1] (No symbol) [0x00007FF7FE7C1B31] GetHandleVerifier [0x00007FF7FEC6871D+3302573] GetHandleVerifier [0x00007FF7FECB4243+3612627] GetHandleVerifier [0x00007FF7FECAA417+3572135] GetHandleVerifier [0x00007FF7FEA05EB6+801862] (No symbol) [0x00007FF7FE8C945F] (No symbol) [0x00007FF7FE8C4FB4] (No symbol) [0x00007FF7FE8C5140] (No symbol) [0x00007FF7FE8B461F] BaseThreadInitThunk [0x00007FFE79E47374+20] RtlUserThreadStart [0x00007FFE7BD3CC91+33]
`