You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Seems like adb connection is closed after each Shell comand:
95:automation direvius$ python ./cmd.py
0
Traceback (most recent call last):
File "./cmd.py", line 16, in <module>
print device.Shell('echo %d' % i)
File "/usr/local/lib/python2.7/site-packages/adb/adb_commands.py", line 227, in Shell
timeout_ms=timeout_ms)
File "/usr/local/lib/python2.7/site-packages/adb/adb_protocol.py", line 369, in Command
return ''.join(cls.StreamingCommand(usb, service, command, timeout_ms))
File "/usr/local/lib/python2.7/site-packages/adb/adb_protocol.py", line 394, in StreamingCommand
for data in connection.ReadUntilClose():
AttributeError: 'NoneType' object has no attribute 'ReadUntilClose'
It works when there are ConnectDevice calls before every Shell
I'm running the example code on README and got the same error.
I installed the latest release 1.2.0 through "pip install adb".
The python version is "Python 2.7.13". It is LG's G6 running Android 7.0 which I'm currently testing with.
Traceback (most recent call last):
File "test.py", line 25, in <module>
print device.Shell('echo %d' % i)
File "/usr/local/lib/python2.7/site-packages/adb/adb_commands.py", line 227, in Shell
timeout_ms=timeout_ms)
File "/usr/local/lib/python2.7/site-packages/adb/adb_protocol.py", line 376, in Command
return ''.join(cls.StreamingCommand(usb, service, command, timeout_ms))
File "/usr/local/lib/python2.7/site-packages/adb/adb_protocol.py", line 404, in StreamingCommand
for data in connection.ReadUntilClose():
AttributeError: 'NoneType' object has no attribute 'ReadUntilClose'
Activity
fahhem commentedon Jun 8, 2017
Which example code is this, and what version of Python? Please retry from head (or the latest PyPI release 1.2.0)
Manabu-GT commentedon Sep 8, 2017
@fahhem
I'm running the example code on README and got the same error.
I installed the latest release 1.2.0 through "pip install adb".
The python version is "Python 2.7.13". It is LG's G6 running Android 7.0 which I'm currently testing with.