root@d8777e944388:/app# python test.py
Traceback (most recent call last):
File "/app/pyChatGPT/src/pyChatGPT/pyChatGPT.py", line 244, in __ensure_cf
WebDriverWait(self.driver, 10).until_not(
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 118, in until_not
raise TimeoutException(message)
selenium.common.exceptions.TimeoutException: Message:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/test.py", line 4, in <module>
api = ChatGPT(sesstion_token)
File "/app/pyChatGPT/src/pyChatGPT/pyChatGPT.py", line 126, in __init__
self.__init_browser()
File "/app/pyChatGPT/src/pyChatGPT/pyChatGPT.py", line 223, in __init_browser
self.__ensure_cf()
File "/app/pyChatGPT/src/pyChatGPT/pyChatGPT.py", line 254, in __ensure_cf
return self.__ensure_cf(retry - 1)
File "/app/pyChatGPT/src/pyChatGPT/pyChatGPT.py", line 261, in __ensure_cf
response = self.driver.find_element(By.TAG_NAME, 'pre').text
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 830, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"tag name","selector":"pre"}
(Session info: chrome=110.0.5481.77)
test.py
from pyChatGPT import ChatGPT
session_token = "xxx"
api = ChatGPT(sesstion_token)
result = api.send_message("hello")
print(result["message"])
I can run these codes normally, but it will fail in the container.
error logs ...
test.py
I can run these codes normally, but it will fail in the container.