My favorites | Sign in
Project Home Issues
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 55632: On SDK 22 monkeyrunner scripts fail to import python modules/classes
2 people starred this issue and may be notified of changes. Back to list
Status:  Released
Closed:  May 2013

Sign in to add a comment
Reported by, May 21, 2013
====================Test Environment================ 
- Android SDK Tools 22
- Android SDK Platform-tools 17
- Android SDK Build-tools 17

- Step 1 – Create a monkeyrunner script ( with the following imports
import os
import sys
from os import path, access, R_OK
from import MonkeyRunner, MonkeyDevice, MonkeyImage
- Step 2 – Run the script using monkeyrunner 

====================Expected Results================ 
- Script should run without errors (on SDK 21.1 there were no issues)

====================Actual Results================== 
- The jython.jar from tools/lib was changed with jython-2.5.3.jar which doesn't have the LIB folder.The following error is received 
130523 14:54:35.401:S [main] [] Scri
pt terminated due to an exception
130523 14:54:35.401:S [main] []Trace
back (most recent call last):
  File "G:\SDK_auto\", line 1, in <module>
    import os
ImportError: No module named os
May 21, 2013
Project Member #1
(No comment was entered for this change.)
May 21, 2013
Project Member #2 lists the dependency as org.python:jython:2.5.3. I believe it should be: org.python:jython-standalone:2.5.3
May 21, 2013
Is there any workaround for this issue? 
May 21, 2013
I am not sure how clean is my solution.
1. Download jython standalone version
2. copy and paste it to android-sdk/tools/lib instead of existent jython there.
3. Run monkey runner
4. when trying to run 'import os' no error occurs.
May 22, 2013
Project Member #5
Yes, 22.0.1 uses jython-standalone instead of jython:
Status: FutureRelease
May 28, 2013
Project Member #6
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting