Running multiple instances of this bot doesn't seem to work
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?
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. https://github.com/Egoistically/ALAuto/blob/fefeaa51089803eaa04d7b7f3e37a7d80083a51d/util/adb.py#L14