Detergent13 / tft-bot

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

PyAutoGUI was unable to import pyscreeze. #126

Closed twohand0809 closed 5 months ago

twohand0809 commented 1 year ago

螢幕擷取畫面 2023-07-03 153816

RomeoAlphaEkko commented 1 year ago

Hi, when did you download it? Did it work before?

twohand0809 commented 1 year ago

not used download today

RomeoAlphaEkko commented 1 year ago

could you check which version of python you are running?

Shadds commented 1 year ago

hi, i have same problem. Python 3.8.3

Detergent13 commented 1 year ago

@Shadds does it work fine when you run in a fresh anaconda environment? (After installing the necessary things)

sotha-sil-zen commented 1 year ago

In my case, this is caused by api issue of pyscreeze.

In its recent release, pyscreeze.grab was removed,. Import it would cause exception.

So I just remove pyscreeze.grab like

https://github.com/asweigart/pyautogui/blob/b4255d0be42c377154c7d92337d7f8515fc63234/pyautogui/__init__.py#L181C22-L181C22

in which,grab has been removed and down here.

https://github.com/asweigart/pyautogui/blob/b4255d0be42c377154c7d92337d7f8515fc63234/pyautogui/__init__.py#L233C5-L233C51.

So, if you are using an old version of PyAutoGUI, you may need to check the __init__.py of PyAutoGUI, especially the two lines where pyscreeze and its functions are imported. (It would not go far away from the exception raising line )

By the way, nice work :)

unkn0wnVII commented 11 months ago
  1. uninstall PyAutoGUI 0.9.50
  2. uninstall PyScreeze 0.1.29
  3. install PyScreeze 0.1.28
  4. install PyAutoGUI 0.9.50
Detergent13 commented 5 months ago

Fixed with #138