AndroidViewClient
AndroidViewClient copied to clipboard
couldn't find device that matches when there is a space in serial no.
adb devices List of devices attached ZUG 5S device
There is a space in serial no.
When try to get device and serial no like following
device, serialNo = ViewClient.connectToDeviceOrExit(serialno = "ZUG 5S")
An exception occus
device, serialNo = ViewClient.connectToDeviceOrExit(serialno = "ZUG 5S")
File "C:\Python27\lib\site-packages\androidviewclient-10.1.8-py2.7.egg\com\dtm
ilano\android\viewclient.py", line 2550, in connectToDeviceOrExit
device = adbclient.AdbClient(serialno, ignoreversioncheck=ignoreversioncheck
)
File "C:\Python27\lib\site-packages\androidviewclient-10.1.8-py2.7.egg\com\dtm
ilano\android\adb\adbclient.py", line 158, in __init__
self.__setTransport()
File "C:\Python27\lib\site-packages\androidviewclient-10.1.8-py2.7.egg\com\dtm
ilano\android\adb\adbclient.py", line 301, in __setTransport
raise RuntimeError("ERROR: couldn't find device that matches '%s' in %s" % (
self.serialno, devices))
RuntimeError: ERROR: couldn't find device that matches 'ZUG 5S' in [<com.dtmilan
o.android.adb.adbclient.Device instance at 0x02014968>]
Press any key to continue . . .
The problem is that (space) is taken as the separator to split the fields in the lines produced byadb's'host:devices-l'which has (space) as separator too.
Try enabling
DEBUG = True
in adbclient.py and post the output to see if we can find a solution.
I seriously doubt space is a valid character in a serial number, which device is it?