I am not sure why i keep getting this error when I click on lyceum.
I am running the game in bluestacks 5.14.0.2002 and when I click on ROK it launches in the same window as bluestacks.
Do i need to make some config changes OR am I doing it entirely wrong.
PS C:\Users\Merlin\Downloads\OSROKBOT-master> & python.exe Classes/UI.py
Your UI Instance
No window found with title: Rise of Kingdoms
Exception in thread Thread-2 (run_single_machine):
Traceback (most recent call last):
File "C:\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, *self._kwargs)
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\OS_ROKBOT.py", line 29, in run_single_machine
if machine.execute():
^^^^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\state_machine.py", line 20, in execute
result = state.perform()
^^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\action.py", line 38, in perform
result = self.execute()
^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\screenshot_action.py", line 23, in execute
width, height = screenshot.size
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'size'
No window found with title: Rise of Kingdoms
Exception in thread Thread-3 (run_single_machine):
Traceback (most recent call last):
File "C:\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Python311\Lib\threading.py", line 975, in run
self._target(self._args, **self._kwargs)
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\OS_ROKBOT.py", line 29, in run_single_machine
if machine.execute():
^^^^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\state_machine.py", line 20, in execute
result = state.perform()
^^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\action.py", line 38, in perform
result = self.execute()
^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\find_and_click_image_action.py", line 20, in execute
break_action_group = self.image_finder.find_and_click_image(self.image, screenshot, win, self.offset_x, self.offset_y, self.max_matches)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\image_finder.py", line 51, in find_and_click_image
best_scale, best_loc, num_matches, best_max_val, target_image, screenshot_cv = self._match_image(target_image_path, screenshot)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\image_finder.py", line 20, in _match_image
screenshot_cv = cv2.cvtColor(np.array(screenshot), cv2.COLOR_RGB2BGR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.8.1) :-1: error: (-5:Bad argument) in function 'cvtColor'
I am not sure why i keep getting this error when I click on lyceum.
I am running the game in bluestacks 5.14.0.2002 and when I click on ROK it launches in the same window as bluestacks.
Do i need to make some config changes OR am I doing it entirely wrong.
PS C:\Users\Merlin\Downloads\OSROKBOT-master> & python.exe Classes/UI.py Your UI Instance No window found with title: Rise of Kingdoms Exception in thread Thread-2 (run_single_machine): Traceback (most recent call last): File "C:\Python311\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "C:\Python311\Lib\threading.py", line 975, in run self._target(*self._args, *self._kwargs) File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\OS_ROKBOT.py", line 29, in run_single_machine if machine.execute(): ^^^^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\state_machine.py", line 20, in execute result = state.perform() ^^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\action.py", line 38, in perform result = self.execute() ^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\screenshot_action.py", line 23, in execute width, height = screenshot.size ^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'size' No window found with title: Rise of Kingdoms Exception in thread Thread-3 (run_single_machine): Traceback (most recent call last): File "C:\Python311\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "C:\Python311\Lib\threading.py", line 975, in run self._target(self._args, **self._kwargs) File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\OS_ROKBOT.py", line 29, in run_single_machine if machine.execute(): ^^^^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\state_machine.py", line 20, in execute result = state.perform() ^^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\action.py", line 38, in perform result = self.execute() ^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\Actions\find_and_click_image_action.py", line 20, in execute break_action_group = self.image_finder.find_and_click_image(self.image, screenshot, win, self.offset_x, self.offset_y, self.max_matches) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\image_finder.py", line 51, in find_and_click_image best_scale, best_loc, num_matches, best_max_val, target_image, screenshot_cv = self._match_image(target_image_path, screenshot) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Merlin\Downloads\OSROKBOT-master\Classes\image_finder.py", line 20, in _match_image screenshot_cv = cv2.cvtColor(np.array(screenshot), cv2.COLOR_RGB2BGR) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cv2.error: OpenCV(4.8.1) :-1: error: (-5:Bad argument) in function 'cvtColor'