ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[BUG]

Open xkat420 opened this issue 2 years ago • 2 comments

Spawning browser...
Traceback (most recent call last):
  File "/home/goupil/.local/lib/python3.8/site-packages/revChatGPT/ChatGPT.py", line 479, in get_cf_cookies
    driver = uc.Chrome(
  File "/home/goupil/.local/lib/python3.8/site-packages/undetected_chromedriver/__init__.py", line 431, in __init__
    super(Chrome, self).__init__(
  File "/home/goupil/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    super().__init__(
  File "/home/goupil/.local/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 106, in __init__
    super().__init__(
  File "/home/goupil/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 288, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/goupil/.local/lib/python3.8/site-packages/undetected_chromedriver/__init__.py", line 693, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/home/goupil/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 381, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/goupil/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
    self.error_handler.check_response(response)
  File "/home/goupil/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:57639
from session not created: This version of ChromeDriver only supports Chrome version 109
Current browser version is 108.0.5359.124
Stacktrace:
#0 0x55f1af121303 <unknown>
#1 0x55f1aeef5d37 <unknown>
#2 0x55f1aef22a54 <unknown>
#3 0x55f1aef19ae9 <unknown>
#4 0x55f1aef5b4a6 <unknown>
#5 0x55f1aef52753 <unknown>
#6 0x55f1aef25a14 <unknown>
#7 0x55f1aef26b7e <unknown>
#8 0x55f1af17032e <unknown>
#9 0x55f1af173c0e <unknown>
#10 0x55f1af156610 <unknown>
#11 0x55f1af174c23 <unknown>
#12 0x55f1af148545 <unknown>
#13 0x55f1af1956a8 <unknown>
#14 0x55f1af195836 <unknown>
#15 0x55f1af1b0d13 <unknown>
#16 0x7fcffc5ab609 start_thread


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "spinhandler_v-chatgptv2.py", line 18, in <module>
    chatbot = Chatbot({
  File "/home/goupil/.local/lib/python3.8/site-packages/revChatGPT/ChatGPT.py", line 81, in __init__
    self.get_cf_cookies()
  File "/home/goupil/.local/lib/python3.8/site-packages/revChatGPT/ChatGPT.py", line 494, in get_cf_cookies
    driver.quit()
UnboundLocalError: local variable 'driver' referenced before assignment/

.........................................................................................................................

### The browser spawns and immediatly gets killed upon getting opened. i'm on Linux. Now i see the logs i need to update chromium lol.........

xkat420 avatar Jan 11 '23 14:01 xkat420

This error occurs when you could not connect the chrome driver. (So you don't have driver variable and caused UnboundLocalError)

SwordElucidator avatar Jan 11 '23 15:01 SwordElucidator

I just had the same issue. Fixed it on Linux running sudo apt update & sudo apt upgrade. Then updated the module throught pip3 install --upgrade revChatGPT

dkouyou avatar Jan 12 '23 19:01 dkouyou