steve1316 / granblue-automation-pyautogui

Educational application aimed at automating user-defined workflows for the mobile game, "Granblue Fantasy", using a variety of CV technologies in the backend such as OpenCV, PyAutoGUI and EasyOCR and a frontend coded in Typescript.
https://github.com/steve1316/granblue-automation-pyautogui/wiki
119 stars 36 forks source link

unable to import pyscreeze #204

Closed xswordcarsh closed 9 months ago

xswordcarsh commented 10 months ago

0:00:01 [ERROR] Bot encountered exception in Farming Mode:

Traceback (most recent call last):

File "C:\Users\HP PAVILION\Desktop\Automate\backend\bot\game.py", line 989, in start_farming_mode

Game._calibrate_game_window(display_info_check = True)

File "C:\Users\HP PAVILION\Desktop\Automate\backend\bot\game.py", line 54, in _calibrate_game_window

Settings.home_button_location = ImageUtils.find_button("home", bypass_general_adjustment = True, tries = 1)

File "C:\Users\HP PAVILION\Desktop\Automate\backend\utils\image_utils.py", line 494, in find_button

result_flag: bool = ImageUtils._match(f"{ImageUtils._current_dir}/images/buttons/{image_name.lower()}.jpg", confidence = custom_confidence,

File "C:\Users\HP PAVILION\Desktop\Automate\backend\utils\image_utils.py", line 146, in _match

image: Image = pyautogui.screenshot()

File "C:\Users\HP PAVILION\AppData\Local\Programs\Python\Python38\lib\site-packages\pyautogui__init__.py", line 231, in _couldNotImportPyScreeze

raise PyAutoGUIException(

pyautogui.PyAutoGUIException: PyAutoGUI was unable to import pyscreeze. (This is likely because you're running a version of Python that Pillow (which pyscreeze depends on) doesn't support currently.) Please install this module to enable the function you tried to call. Granblue_Automation_jBjGRjTwp5

xswordcarsh commented 10 months ago

nvm found the issue

pip install --upgrade pyautogui pip install --upgrade pillow

steve1316 commented 9 months ago

Thanks for posting the solution. Added it to the Wiki 👍