AxelBjork / Rush-Royale-Bot

Python based bot for Rush Royale
MIT License
32 stars 21 forks source link

OS error. #6

Closed T9es closed 2 years ago

T9es commented 2 years ago

Did everything as specified, getting this error on repeat:

CalledProcessError: Command 'C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\adbutils\binaries\adb.exe -s emulator-5554 push C:\Users\AppData\Local\Programs\Python\Python39\Lib\site-packages\scrcpy\scrcpy-server.jar /data/local/tmp/' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

OSError: [Errno subprocess] C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\adbutils\binaries\adb.exe -s emulator-5554 push C:\Users\AppData\Local\Programs\Python\Python39\Lib\site-packages\scrcpy\scrcpy-server.jar /data/local/tmp/: "adb: error: failed to get feature set: device 'emulator-5554' not found\r\n"

Not sure how to fix this. Went through google for solid 1-2 hours, and could not manage to find any solid fix.

AxelBjork commented 2 years ago

That looks like it's gotten pretty far. It just looks like Scrcpy can't find Bluestacks.

You could try to first just get Scrcpy running. I use the prebuilt archive from their github.

For Bluestacks version 5.3 or less it should always be emulator-5554 and Scrcpy finds it automatically. Newer versions seems to randomize port on startup and I have a script which needs to scan for a few seconds to find it automatically in that case.

If you go in Bluestacks advanced settings and it says 127.0.0.1:5555 you should be able just to launch Scrcpy from the windows executable. Otherwise you can open a command line and type in,

{Scrcpy path}/scrcpy - s 127.0.0.1:xxxxx

That should launch it correctly.

If you had to type the port make sure you set static_adb_port = False in the bot config.ini file. Also make sure that the Scrcpy path is correct.

T9es commented 2 years ago

Right, got it to run, although it was not as easy as it was supposed to be. Had to manually add adb host, after that edit the code in the bot file to launch the localhost... and that's about it. Got it running, so glad I finally got it working