your stack trace doesn't match your code: if img_1.sameAs(1, img_2):
has the arguments in the wrong order. It should be: if img_1.sameAs(img_2, 1) On Mon, May 23, 2011 at 2:58 AM, Alexander Sukhov <testsem...@gmail.com>wrote: > Hello, > > I build SDK from source code. > And i want to use the following script: > > img=MonkeyRunner.loadImageFromFile(path='bla bla bla') > > img_1=device.takeSnapshot() > > img_1.sameAs(img, 1) > > But this error: > File "/home/semc/monkey/out/host/linux-x86/sdk/android- > sdk_eng.semc_linux-x86/tools/test.py", line 23, in <module> > if img_1.sameAs(1, img_2): > at com.android.monkeyrunner.MonkeyImage.sameAs(MonkeyImage.java:138) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: > 25) > at java.lang.reflect.Method.invoke(Method.java:597) > > java.lang.ClassCastException: java.lang.ClassCastException: > org.python.core.PySingleton cannot be cast to > com.android.monkeyrunner.core.IMonkeyImage > > Please help! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en