terry3041 / pyChatGPT

An unofficial Python wrapper for OpenAI's ChatGPT API
GNU General Public License v3.0
1.35k stars 255 forks source link

Unable to locate element: {"method":"xpath","selector":"//div[@data-recaptcha-provider="recaptcha_enterprise"]"} #116

Open kimkimkeren opened 1 year ago

kimkimkeren commented 1 year ago

This error was occured since around 2022-01-28 19:30 GMT+7

Traceback (most recent call last):
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\Auth0.py", line 214, in __openai_login
    WebDriverWait(self.driver, 3).until(
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\support\wait.py", line 95, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
Backtrace:
        (No symbol) [0x00286643]
        (No symbol) [0x0021BE21]
        (No symbol) [0x0011DA9D]
        (No symbol) [0x00151342]
        (No symbol) [0x0015147B]
        (No symbol) [0x00188DC2]
        (No symbol) [0x0016FDC4]
        (No symbol) [0x00186B09]
        (No symbol) [0x0016FB76]
        (No symbol) [0x001449C1]
        (No symbol) [0x00145E5D]
        GetHandleVerifier [0x004FA142+2497106]
        GetHandleVerifier [0x005285D3+2686691]
        GetHandleVerifier [0x0052BB9C+2700460]
        GetHandleVerifier [0x00333B10+635936]
        (No symbol) [0x00224A1F]
        (No symbol) [0x0022A418]
        (No symbol) [0x0022A505]
        (No symbol) [0x0023508B]
        BaseThreadInitThunk [0x76B47D69+25]
        RtlInitializeExceptionChain [0x77B2BB9B+107]
        RtlClearBits [0x77B2BB1F+191]
        (No symbol) [0x00000000]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "script.py", line 135, in <module>
    api = pyChatGPT(**config_pychatgpt)
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\pyChatGPT.py", line 126, in __init__
    self.__init_browser()
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\pyChatGPT.py", line 223, in __init_browser
    self.__ensure_cf()
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\pyChatGPT.py", line 269, in __ensure_cf
    self.__login()
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\pyChatGPT.py", line 318, in __login
    Auth0.login(self)
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\Auth0.py", line 40, in login
    __openai_login(self)
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\Auth0.py", line 223, in __openai_login
    __twocaptcha_solve(self, retry)
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\Auth0.py", line 168, in __twocaptcha_solve
    sitekey = self.driver.find_element(*openai_captcha_sitekey).get_attribute(
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 861, in find_element
    return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 444, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 249, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@data-recaptcha-provider="recaptcha_enterprise"]"}
  (Session info: chrome=109.0.5414.120)
Stacktrace:
Backtrace:
        (No symbol) [0x00286643]
        (No symbol) [0x0021BE21]
        (No symbol) [0x0011DA9D]
        (No symbol) [0x00151342]
        (No symbol) [0x0015147B]
        (No symbol) [0x00188DC2]
        (No symbol) [0x0016FDC4]
        (No symbol) [0x00186B09]
        (No symbol) [0x0016FB76]
        (No symbol) [0x001449C1]
        (No symbol) [0x00145E5D]
        GetHandleVerifier [0x004FA142+2497106]
        GetHandleVerifier [0x005285D3+2686691]
        GetHandleVerifier [0x0052BB9C+2700460]
        GetHandleVerifier [0x00333B10+635936]
        (No symbol) [0x00224A1F]
        (No symbol) [0x0022A418]
        (No symbol) [0x0022A505]
        (No symbol) [0x0023508B]
        BaseThreadInitThunk [0x76B47D69+25]
        RtlInitializeExceptionChain [0x77B2BB9B+107]
        RtlClearBits [0x77B2BB1F+191]
        (No symbol) [0x00000000]