Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Running multiple instances of this bot doesn't seem to work #135

Open
observeroftime02 opened this issue Apr 29, 2020 · 1 comment
Open

Comments

@observeroftime02
Copy link

I'd like to run several instances of this bot at the same time. I created multiple folders all with their own copy of the scripts in this repository and configure them to connect to the proper android device. Starting up a second instance of the script crashes the first one. Am I doing something wrong? Here's the error it spits out.

Traceback (most recent call last):
File "ALAuto.py", line 234, in
Utils.update_screen()
File "C:\Users\USERNAME\ALAuto-master-note5\util\utils.py", line 154, in update_screen
screen = cv2.imdecode(numpy.fromstring(Adb.exec_out('screencap -p'), dtype=numpy.uint8), 0)
cv2.error: OpenCV(3.4.4) C:\projects\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:750: error: (-215:Assertion failed) !buf.empty() && buf.isContinuous() in function 'cv::imdecode_'

As it stands I have to use a separate virtual machine per instance of the script I'd like to run which isn't exactly ideal, anyone got any ideas?

@hjk22
Copy link
Collaborator

hjk22 commented May 2, 2020

Each time the script is launched, the adb server get killed and then restarted: this is what it's preventing you from running multiple instances of the bot, I think.
Try commenting this line.

self.kill_server()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants