0

I've been working with the adbClient.py from AndroidViewClient. I've run across the following error thrown occasionally and not sure how to fix it.

Traceback (most recent call last):
File "/Users/damonh/projects/prodtests/tablet/test_homePage.py", line 15, in <module>
print adb.getSdkVersion()
File "/Users/damonh/projects/prodtests/tablet/adbClient.py", line 541, in getSdkVersion
self.__checkTransport()
File "/Users/damonh/projects/prodtests/tablet/adbClient.py", line 312, in __checkTransport
raise RuntimeError("ERROR: Transport is not set")
RuntimeError: ERROR: Transport is not set

an example would be: getSdkVersion()

Here is my test code:

import adbClient
adb=adbClient.AdbClient()
print adb.getSdkVersion()

This is just one. Another would be the shell method. Any help in the right direction would be appreciated.

  • If you show more about the script perhaps I can help you. Are you taking screenshots? – Diego Torres Milano May 19 '15 at 22:57
  • I am using the adbClient.py from your library to import from. The test code I have above is all I am doing. If I try adb.wake I get the same thing. What is TRANSPORT and what should it be set to? – Damon Hermann May 19 '15 at 23:24

1 Answers1

1

I thought you script was just an example, but if it's the real one you are missing the serialno parameter to AdbClient and that's why the transport is not set.

You should do

import adbClient
adb=adbClient.AdbClient(serialno='.*')
print adb.getSdkVersion()

or replace by whatever regular expression or serial number you are intending to use.

To be able to communicate with a specific device, adb should set the transport using 'host:transport:<serialno>', then if the serialno is None (default value) it cannot be done.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • Thank you for that. I do have another issue which I will post once I get good info. Seems a child activity is not able to be accessed. Even though culebra is returning all the info I should need. Thanks for building this wonderful library! – Damon Hermann May 19 '15 at 23:41