Tishj / VortexBot

Bot used to automate a wide range of tasks in pokemon-vortex. Written in Python using Selenium, Pickle, requests and lxml
3 stars 5 forks source link

element click intercepted #2

Open magichat17 opened 3 years ago

magichat17 commented 3 years ago

Hi, I'm not really a coder or anything, I just fiddled around with python and manage to get your script working but I always get this error randomly while using sidequest mode:

"Message: element click intercepted: Element is not clickable at point (446, 633) "

the longest I got it running was like 12 minutes tops before it shows

another problem I'm getting is with catch mode, I can't seem to make it work. whenever I try to run it, I always get "Key Error: Poké Ball" at the end of line.

I hope you notice this. Again, I'm not a coder or anything, but any help will be appreciated.

Tishj commented 3 years ago

Hey, it comes as a pleasant surprise that my little bot is actually getting used :P I'll see what I can do to fix it!

The first error can potentially be caused by another element that is layered on top of the one we're currently trying to click, or because the element we're trying to click has yet to load properly. I first had this error pop up when trying to click a button while the "Loading.." element was active, I added a "wait" that stops when the "Loading.." element was inactive, so it might be that that's failing, but I would need a little more detail about the exact scenario when this error happens :/

The second error might have to do with a Python version issue, the way the items are initialized might be incompatible with an older version of Python, I'll change the way they're initialized just to be safe, but I think you should make sure you're using python3 and up (I'm using Python 3.7.5) (as a side note, this difference in version might also affect selenium, so it could also fix the above issue)

magichat17 commented 3 years ago

Hey, it comes as a pleasant surprise that my little bot is actually getting used :P I'll see what I can do to fix it!

The first error can potentially be caused by another element that is layered on top of the one we're currently trying to click, or because the element we're trying to click has yet to load properly. I first had this error pop up when trying to click a button while the "Loading.." element was active, I added a "wait" that stops when the "Loading.." element was inactive, so it might be that that's failing, but I would need a little more detail about the exact scenario when this error happens :/

The second error might have to do with a Python version issue, the way the items are initialized might be incompatible with an older version of Python, I'll change the way they're initialized just to be safe, but I think you should make sure you're using python3 and up (I'm using Python 3.7.5) (as a side note, this difference in version might also affect selenium, so it could also fix the above issue)

Okay, so I decided to run it on python 3.7.5 as well, still getting the same error. It seems like the error always happen mid battle with the button "Attack". It happens randomly, sometimes even at the first sidequest battle that's initiated. I tried using another method I found which is in javascript but for farming trainer battles instead. Although there are no error reports like in python, the same issue appears as well where the script will pause randomly during fight and will only resume when I manually click "Attack". I don't know if this would be of any help, but that's what I've observed so far

EDIT: I got past the key error in catch mode, turns out it literally was just a key error, I just changed all "Poké Ball" entry into "Poke Ball" as it shows in the game website but when I get to live map I'm getting "Message: javascript error: Cannot convert a Symbol value to a string" error

full traceback: File "vortexbot.py", line 814, in <module> player.gotta_catch_em_all() File "vortexbot.py", line 263, in gotta_catch_em_all if evaluate_pokemon_info(mutex, pokefound, [""]): File "vortexbot.py", line 104, in evaluate_pokemon_info encounter = driver.execute_script('return Phaser.Display.Canvas.CanvasPool.pool[2].parent.scene.encounterProfile.encounter;') File "C:\Users\zzz\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium-4.0.0a7-py3.7.egg\selenium\webdriver\remote\webdriver.py", line 761, in execute_script 'args': converted_args})['value'] File "C:\Users\zzz\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium-4.0.0a7-py3.7.egg\selenium\webdriver\remote\webdriver.py", line 368, in execute self.error_handler.check_response(response) File "C:\Users\zzz\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium-4.0.0a7-py3.7.egg\selenium\webdriver\remote\errorhandler.py", line 240, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot convert a Symbol value to a string (Session info: chrome=89.0.4389.82)

I'm sorry, I know this is not supposed to be a tutorial thing, I just really don't know what I'm doing and if any of the info I'm giving is of any help. I'm just really desperate to get this working.

frasermck commented 3 years ago

Im also having the same problem as the person above ^

conducked commented 3 years ago

Any updates on if this is working? I've been looking for a bot for months and came across this one in my travels and it seems promising, if we could use it to catch certain pokemon and to do sidequest that would be awesome!

Tishj commented 2 years ago

'catch' functionality is dead, but sidequests/gyms should still work :)