AxelBjork / Rush-Royale-Bot

Python based bot for Rush Royale
MIT License
29 stars 19 forks source link

Failed to get screen #88

Open Gorgias26 opened 10 months ago

Gorgias26 commented 10 months ago

Hello i have a problem.

I started on nox player and managed to get it to work. It plays the game, but at the end of the game it bugs.

So I put it on bluestack. The bot doesn't want to launch, I set the ports correctly.

But it can't detect the image, I've tried on the home, on the game, but it won't launch.

log program and consol :

[12:16] GUI started! [12:16] Stored settings to config! [12:16] Starting bot... [12:16] Selected units: chemist, harlequin, bombardier, dryad, demon_hunter [12:16] PVE is set to True [12:16] Bot mainloop started [12:16] Failed to get screen

`* daemon not running; starting now at tcp:5037

Rush Royale Bot v1.1
,. ....--._
,' """"""""'-._
J _____`-.
F .-' -88888-'Y8888b.`.
.' P'88888b \
J # L # q8888b L
)8888D )
J \ J d8888P P
L `. .b. ,88888P /
.-.,o88888o.,o88888P'.'
`-.__..-'
.-----.........____J
.'
J--- -----.. ...___ ___
Y--- -----.. ...___ ___
`.
`'-------:....__ __.J
L___
 """----...______________....--'

error: more than one device/emulator Exception in thread Thread-4 (bot_loop): Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner self.run() File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self._target(*self._args, **self._kwargs) File "C:\Users\Admin\Desktop\Rush-Royale-Bot-main\Src\bot_handler.py", line 105, in bot_loop output = bot.battle_screen(start=False) File "C:\Users\Admin\Desktop\Rush-Royale-Bot-main\Src\bot_core.py", line 403, in battle_screen df = self.get_current_icons(available=True) File "C:\Users\Admin\Desktop\Rush-Royale-Bot-main\Src\bot_core.py", line 151, in get_current_icons img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'`