1

I am currently using the following versions Python - 2.7.10 ( 32 bit , win) AndroidViewClient - androidviewclient-10.7.1-py2.7.egg

I have a simple program as below

import sys
import os
try:
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
except:
pass
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
device.takeSnapshot().save('Menu.png','PNG')

This is giving me the following error

*Traceback (most recent call last):
  File "dump.py", line 14, in <module>
    device.takeSnapshot().save('Menu.png','PNG')
  File "C:\Python27\lib\site-packages\androidviewclient-10.7.1-py2.7.egg\com\dtmilano\android\adb\adbclient.py", line 678, in takeSnapshot
    image = Image.open(stream)
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 2126, in open
    % (filename if filename else fp))
IOError: cannot identify image file <cStringIO.StringI object at 0x023462A8>*

The Same snippet code - works for some devices and for some it doesnt How can i figure out what is wrong with the devices where it doesnt work Also please help me idetify any configuration issues as i am new to this

Shekhar
  • 11
  • 1

0 Answers0