vic1707 / AutoPlay-PokeMeow-Discord

A bot that plays PokeMeow for you
15 stars 19 forks source link

AttributeError: 'CustomDriver' object has no attribute 'w3c' #42

Open jorfung opened 2 years ago

jorfung commented 2 years ago

It doesnt work. A window flashed

It's 14:34:31, working time !

DevTools listening on ws://127.0.0.1:56567/devtools/browser/24c0b1ec-1aea-4dda-aa62-e65a23464bf4 Traceback (most recent call last): File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in init RemoteWebDriver.init( File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 92 Current browser version is 102.0.5005.115 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\bot.py", line 40, in DRIVER = CustomDriver(ARGUMENTS) File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\Classes\CustomDriver.py", line 54, in init webdriver.Chrome.init(self, executable_path=path_binary, chrome_options=options) File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\chrome\webdriver.py", line 83, in init self.quit() File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\firefox\webdriver.py", line 208, in quit if self.w3c: AttributeError: 'CustomDriver' object has no attribute 'w3c'

Additional context

vic1707 commented 2 years ago

You need to update the binaries of the webdriver folder from the browser's website to your version, those provided are outdated

jorfung commented 2 years ago

Thank you very much.I have just finished this problem because I am not good at English.😂 But now,there is a new problem.

jorfung commented 2 years ago

image It trun to this page

jorfung commented 2 years ago

It's 20:16:58, working time !

DevTools listening on ws://127.0.0.1:65377/devtools/browser/586b9e60-d0e5-48ef-a914-83e72a8d59dd Traceback (most recent call last): File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\bot.py", line 40, in DRIVER = CustomDriver(ARGUMENTS) File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\Classes\CustomDriver.py", line 72, in init self.DiscordLogin(self.CHANNEL) File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\Classes\CustomDriver.py", line 77, in DiscordLogin self.get(CHANNEL) File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get self.execute(Command.GET, {'url': url}) File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidArgumentException: Message: invalid argument (Session info: chrome=103.0.5060.53)

vic1707 commented 2 years ago

hello, can you give me the command you used to run the bot ? HIDE YOUR CREDENTIALS by bluring them !

jorfung commented 2 years ago

python bot.py -U 'JorFung' -M 'aaaa@gmail.com' -P 'aaaa' -C 'https://discord.com/channels/982092376283689031/982092376283689033'

vic1707 commented 2 years ago

can you try with double quotes around the channel URL cause everything seems fine

jorfung commented 2 years ago

image

jorfung commented 2 years ago

It's 17:33:21, working time !

DevTools listening on ws://127.0.0.1:57302/devtools/browser/b4ef55b7-496b-4940-8fcd-d08fda81010e Traceback (most recent call last): File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\bot.py", line 40, in DRIVER = CustomDriver(ARGUMENTS) File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\Classes\CustomDriver.py", line 72, in init self.DiscordLogin(self.CHANNEL) File "E:\新增資料夾\AutoPlay-PokeMeow-Discord-main\AutoPlay-PokeMeow-Discord-main\Classes\CustomDriver.py", line 78, in DiscordLogin self.find_element_by_name("email").send_keys(self.MAIL) File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 496, in find_element_by_name return self.find_element(by=By.NAME, value=name) File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\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":"[name="email"]"} (Session info: chrome=103.0.5060.114)

Press Enter to close !![10700:14556:0705/173422.825:ERROR:util.cc(127)] Can't create base directory: C:\Program Files\Google\GoogleUpdater

jorfung commented 2 years ago

[10720:9336:0705/174412.237:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is disabled, ANGLE is

vic1707 commented 2 years ago

The bot doesn't seem to find the email input, I guess the Chinese(?) Version of the login page doesn't have the same layout 🤔 can you inspect the input tu find its html classes and IDs? Also you seems to be getting errors about your GPU, I can't do anything about this