Closed Allesanddro closed 2 years ago
here too
This problem is caused because twitch actively changes the websites html to prevent programs like this from reliably working
Here is some simple steps to fix it.
Identify what piece of code is broken.
With the Firefox window open right click the element and inspect then copy xpath
Replace the xpath in the code with the new xpath
Rerun and repeat until you fix all the issues shouldn't take long
Create a pull request with the updated xpath's if you want to this isn't necessary
After the xpath is replaced it should work for a solid 2 weeks unless you get unlucky with when they decide to change it.
Sorry for taking so long to respond I've been busy
Traceback (most recent call last): File "D:\projects\Twitch-Account-Toolbox\Modules\TAC.py", line 65, in <module> select = Select(driver.find_element(By.XPATH, '/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[3]/div/div[2]/div[1]/select')) File "C:\Users\Sandro\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1251, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\Sandro\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute self.error_handler.check_response(response) File "C:\Users\Sandro\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: /html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[3]/div/div[2]/div[1]/select Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:188:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:400:5 element.find/</<@chrome://remote/content/marionette/element.js:292:16
when running the project I encounter this.