Detergent13 / tft-bot

Automate Teamfight Tactics (TFT) for token/mission farming. Updated for Set 11!
GNU Affero General Public License v3.0
81 stars 45 forks source link

ScreenShot has no Attribute #51

Closed sharjeelarif010321 closed 2 years ago

sharjeelarif010321 commented 2 years ago

Hi, I keep getting this error when I try to run the script. Traceback (most recent call last): File "tft.py", line 203, in queue() File "tft.py", line 65, in queue if onscreen("./captures/tft logo.png"): File "tft.py", line 24, in onscreen return search(path, precision)[0] != -1 File "/Users/sharjeelarif/opt/anaconda3/lib/python3.8/site-packages/python_imagesearch/imagesearch.py", line 120, in imagesearch im.thumbnail((round(im.size[0] 0.5), round(im.size[1] 0.5))) AttributeError: 'ScreenShot' object has no attribute 'thumbnail'

I'm running this on MacOS

Detergent13 commented 2 years ago

Hey! This is almost certainly caused by either the wrong version or a corrupt version of OpenCV and/or ImageSearch. Please try completely uninstalling and reinstalling both!

sharjeelarif010321 commented 2 years ago

Yup got it working but now the bot is stuck at queuing up and nothing after that. The terminal has full accessibility permissions and the script is being run as admin using sudo. Do you know any reason why this is happening? I checked previous closed issues but no solution seems to resolve my problem. The client is set to the correct dimensions as well.

Detergent13 commented 2 years ago

Re-capture the accept button!

sharjeelarif010321 commented 2 years ago

I can't seem to get the bot to accept the accept dialogue. I've updated the accept.png screenshot.

Detergent13 commented 2 years ago

Maybe decrease the confidence for the accept clicking? And does the mouse go to the button and not click, or just does nothing when it pops up?