SlymeGPT icon indicating copy to clipboard operation
SlymeGPT copied to clipboard

Unable to locate element

Open KeyLoggerDresioO opened this issue 1 year ago • 1 comments

Hello, I have a problem. After running the script using "python .\open_browser.py", I receive the following message. How can I fix this?

Error: Traceback (most recent call last): File "c:\Users\Administrator\Desktop\ChatGPT-projekty\SlymeGPT\example.py", line 33, in <module> main() File "c:\Users\Administrator\Desktop\ChatGPT-projekty\SlymeGPT\example.py", line 9, in main slyme.select_latest_chat() File "c:\Users\Administrator\Desktop\ChatGPT-projekty\SlymeGPT\slyme.py", line 35, in wrapper raise e ^^^^^^^ File "c:\Users\Administrator\Desktop\ChatGPT-projekty\SlymeGPT\slyme.py", line 22, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\Administrator\Desktop\ChatGPT-projekty\SlymeGPT\slyme.py", line 179, in select_latest_chat chat_element = self.driver.find_element(By.CSS_SELECTOR, self.config.get('css', 'chat_elements')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Desktop\ChatGPT-projekty\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 831, in find_element return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Desktop\ChatGPT-projekty\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\Desktop\ChatGPT-projekty\.venv\Lib\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":"css selector","selector":"li.relative[data-projection-id]"} (Session info: chrome=113.0.5672.93)

KeyLoggerDresioO avatar May 12 '23 17:05 KeyLoggerDresioO

Hello, can you try running open_browser.py again? What does it display? If you're already logged into ChatGPT, then AFAIK the only actions that can cause the issue are either starting the driver in headless mode or minimizing the browser window before it is automatically performed

mache102 avatar May 13 '23 07:05 mache102