Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't find device that matches when there is a space in serial no. #153

Open
KyanWang opened this issue Sep 28, 2015 · 1 comment
Open

Comments

@KyanWang
Copy link

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 . . .
@dtmilano
Copy link
Owner

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?

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

No branches or pull requests

2 participants