Jimm1432 / Rush-Royale-Bot

Python based bot for Rush Royale
MIT License
13 stars 4 forks source link

Error #10

Closed bigenergy closed 11 months ago

bigenergy commented 1 year ago

Exception in thread Thread-3337:
Traceback (most recent call last):
  File "C:\Users\Big_Energy\AppData\Local\Programs\Python\Python39\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Users\Big_Energy\AppData\Local\Programs\Python\Python39\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Big_Energy\Desktop\Rush-Royale-Bot-main2\Src\bot_handler.py", line 139, in bot_loop
    grid_df, bot.unit_series, bot.merge_series, bot.df_groups, bot.info = combat_loop(
  File "C:\Users\Big_Energy\Desktop\Rush-Royale-Bot-main2\Src\bot_handler.py", line 81, in combat_loop
    grid_df, unit_series, merge_series, df_groups, info = bot.try_merge(prev_grid=grid_df, merge_target=user_target)
  File "C:\Users\Big_Energy\Desktop\Rush-Royale-Bot-main2\Src\bot_core.py", line 301, in try_merge
    grid_df = bot_perception.grid_status(names, prev_grid=prev_grid)
  File "C:\Users\Big_Energy\Desktop\Rush-Royale-Bot-main2\Src\bot_perception.py", line 53, in grid_status
    ref_colors = [get_color('units/' + unit)[0] for unit in ref_units]
  File "C:\Users\Big_Energy\Desktop\Rush-Royale-Bot-main2\Src\bot_perception.py", line 53, in <listcomp>
    ref_colors = [get_color('units/' + unit)[0] for unit in ref_units]
  File "C:\Users\Big_Energy\Desktop\Rush-Royale-Bot-main2\Src\bot_perception.py", line 20, in get_color
    unit_img = cv2.cvtColor(unit_img, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'```