Mekolaos / Aternos-On-Discord

A Discord Bot to manage a minecraft server on Aternos.
GNU General Public License v3.0
101 stars 91 forks source link

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"body > div > main > section> div > div.servers.single > div > div.server-body"} (Session info: headless chrome=95.0.4638.69) #71

Open thtfth opened 2 years ago

thtfth commented 2 years ago

full error output: DevTools listening on ws://[hidden]:50991/devtools/browser/181c3580-6d89-4398-ac3d-169a1df1010c [WARNING] 2021-11-14 13:45:17,819 - PyNaCl is not installed, voice will NOT be supported [INFO] 2021-11-14 13:45:19,476 - logging in using static token [INFO] 2021-11-14 13:45:20,331 - Shard ID None has sent the IDENTIFY payload. [INFO] 2021-11-14 13:45:20,638 - Shard ID None has connected to Gateway: ["gateway-prd-main-2g1w",{"micros":79026,"calls":["discord-sessions-blue-prd-2-113",{"micros":78127,"calls":["start_session",{"micros":29793,"calls":["api-prd-main-mrtx",{"micros":26098,"calls":["get_user",{"micros":2914},"add_authorized_ip",{"micros":1481},"get_guilds",{"micros":3319},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":47779,"calls":[]}]}]}] (Session ID: 660fa4c4af70e3e0ebeb02c78519477e). Ignoring exception in on_ready Traceback (most recent call last): File "C:\Users\l.e.yu\AppData\Roaming\Python\Python39\site-packages\discord\client.py", line 343, in _run_event await coro(*args, **kwargs) File "C:\Users\l.e.yu\Desktop\Aternos-On-Discord-master\Bot.py", line 51, in on_ready connect_account() # logs into aternos File "C:\Users\l.e.yu\Desktop\Aternos-On-Discord-master\connect_and_launch.py", line 124, in connect_account element = driver.find_element_by_css_selector('body > div > main > section' File "C:\Users\l.e.yu\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 598, in find_element_by_css_selector return self.find_element(by=By.CSS_SELECTOR, value=css_selector) File "C:\Users\l.e.yu\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\l.e.yu\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\l.e.yu\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, 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":"body > div > main > section> div > div.servers.single > div > div.server-body"} (Session info: headless chrome=95.0.4638.69)

JasonBenfrin commented 2 years ago

I'm getting a similar error too

Keinamvy commented 2 years ago

Just don't use an account with 2 server in it

pritam20ps05 commented 2 years ago

please once check my project on this https://github.com/pritam20ps05/mcscraper it works pretty well and works 98% of the time my server personally uses it. In this you can control as many servers as you can and its dynamically updated

see this image