uiautomator icon indicating copy to clipboard operation
uiautomator copied to clipboard

IOError: RPC server not started!

Open CrystalChen1017 opened this issue 7 years ago • 2 comments

Something wrong when I try to connect device,.

    from uiautomator import Device
    d = Device()
    print d.info

But I got IOError. I am using window OS. Does it works on windows?

CrystalChen1017 avatar Nov 14 '17 03:11 CrystalChen1017

except Exception,e: d.info #try 1/2

onlinesen avatar May 24 '18 07:05 onlinesen

@onlinesen I don't know how adding a try/except block can solve anything here.

@CrystalChen1017 Seems you didn't read documentation at all. To use the uiautomator class without set the serial, you need to import lie from uiautomator import device as d then just print(d.info). But, to do that, your first need to set the ANDROID_SERIAL env variable. I don't really know why there's no subprocess mechanism to get default ID from adb devices command.

I've tried it both via cable and wifi adb and worked with no problem.

erm3nda avatar Jun 19 '18 04:06 erm3nda