monkeyrunner运行报错如下

181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]Traceback (most recent call last):
File "E:\Appium\Tools\Android\Android-sdk\android-sdk-windows\tools\lib\Lib\encodings__init__.py", line 31, in
import codecs
File "E:\Appium\Tools\Android\Android-sdk\android-sdk-windows\tools\lib\Lib\codecs.py", line 16
except ImportError as why:
^
SyntaxError: mismatched input 'as' expecting COLON

181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.ParserFacade.fixParseError(ParserFacade.java:92)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.ParserFacade.parse(ParserFacade.java:184)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.compileSource(imp.java:326)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.createFromSource(imp.java:348)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.loadFromSource(imp.java:581)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.find_module(imp.java:478)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_next(imp.java:718)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_first(imp.java:748)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_module_level(imp.java:837)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.importName(imp.java:917)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyObject.__call__(PyObject.java:357)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.__builtin__.__import__(__builtin__.java:1173)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.importOne(imp.java:936)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at encodings$py.f$0(E:\Appium\Tools\Android\Android-sdk\android-sdk-windows\tools\lib\Lib\encodings__init__.py:152)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at encodings$py.call_function(E:\Appium\Tools\Android\Android-sdk\android-sdk-windows\tools\lib\Lib\encodings__init__.py)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyTableCode.call(PyTableCode.java:165)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyCode.call(PyCode.java:18)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.createFromCode(imp.java:391)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.createFromPyClass(imp.java:209)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.loadFromSource(imp.java:572)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.find_module(imp.java:478)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_next(imp.java:718)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_first(imp.java:739)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.load(imp.java:631)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.codecs.import_encodings(codecs.java:109)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.codecs.registry_init(codecs.java:405)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.codecs.lookup(codecs.java:74)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.codecs.encode(codecs.java:192)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyString.str_encode(PyString.java:2458)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyString.encode(PyString.java:2449)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.GrammarActions.extractString(GrammarActions.java:472)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.GrammarActions.extractStrings(GrammarActions.java:428)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.atom(PythonParser.java:10896)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.power(PythonParser.java:10215)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.factor(PythonParser.java:10142)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.term(PythonParser.java:9696)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.arith_expr(PythonParser.java:9422)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.shift_expr(PythonParser.java:9149)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.and_expr(PythonParser.java:8982)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.xor_expr(PythonParser.java:8819)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.expr(PythonParser.java:8655)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.comparison(PythonParser.java:8201)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.not_test(PythonParser.java:8128)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.and_test(PythonParser.java:7920)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.or_test(PythonParser.java:7758)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.test(PythonParser.java:7618)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.testlist(PythonParser.java:12581)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.expr_stmt(PythonParser.java:3032)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.small_stmt(PythonParser.java:2584)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.simple_stmt(PythonParser.java:2433)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.stmt(PythonParser.java:2347)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.PythonParser.file_input(PythonParser.java:641)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.antlr.BaseParser.parseModule(BaseParser.java:78)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.CompileMode$3.dispatch(CompileMode.java:22)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.ParserFacade.parse(ParserFacade.java:152)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.ParserFacade.parse(ParserFacade.java:182)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.Py.compile_flags(Py.java:1731)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.__builtin__.execfile_flags(__builtin__.java:514)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.ScriptRunner.run(ScriptRunner.java:116)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:77)
181031 16:29:52.035:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:189)

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问