Eclipse+pydev+python+monkeyrunner Development environment

Source: Internet
Author: User

In the editing development process, cannot implement the comment, a comment will be error, as shown in:

141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception
141108 14:13:01.264:s [main] [com.android.monkeyrunner.monkeyrunneroptions]syntaxerror:non-ascii character in file ' D : \javawork\monkeyrunnertest\src\uninstallapk.py ', but no encoding declared; See http://www.python.org/peps/pep-0263.html for details

141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Org.python.core.Py.SyntaxError ( py.java:166)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Org.python.core.ParserFacade.fixParseError (parserfacade.java:102)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Org.python.core.ParserFacade.parse ( parserfacade.java:184)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Org.python.core.Py.compile_flags ( py.java:1731)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Org.python.core.__builtin__.execfile _flags (__builtin__.java:514)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Org.python.util.PythonInterpreter.execfile (pythoninterpreter.java:225)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Com.android.monkeyrunner.ScriptRunner.run (scriptrunner.java:116)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Com.android.monkeyrunner.MonkeyRunnerStarter.run (monkeyrunnerstarter.java:77)
141108 14:13:01.264:s [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at Com.android.monkeyrunner.MonkeyRunnerStarter.main (monkeyrunnerstarter.java:189)

The cause of the error is not added

#-*-Coding:utf-8-*-Notes

The reason is Chinese does not recognize, need to add a character code comment

There are other ways to fix this, like in Windows->preferences, but I'm going to try and get an error.

Eclipse+pydev+python+monkeyrunner Development environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.