使用eclipse和grinder导入随机和字符串模块时出错

时间:2015-01-06 14:11:29

标签: python eclipse jython grinder

我有一个磨床脚本。该脚本正常工作,但是当我想导入字符串和随机模块时,会抛出以下错误:

2015-01-06 15:51:48,356 ERROR PCAA-0: aborting process - Java exception initialising test script
net.grinder.scriptengine.jython.JythonScriptExecutionException: Java exception initialising test script
File "C:\Grinder\lib\jython-standalone-2.5.3.jar\re$py.class", line 279, in <module>
File "C:\Grinder\lib\jython-standalone-2.5.3.jar\string$py.class", line 81, in <module>
import string
File "C:\Users\net_user\workspace\Grinder\grinder_1.py", line 2, in <module>
java.lang.ArrayIndexOutOfBoundsException: 10
at org.python.objectweb.asm.ClassReader.a(Unknown Source) ~[jython-standalone-2.5.3.jar:na]
at org.python.objectweb.asm.ClassReader.accept(Unknown Source) ~[jython-standalone-2.5.3.jar:na]
at org.python.objectweb.asm.ClassReader.accept(Unknown Source) ~[jython-standalone-2.5.3.jar:na]
at org.python.core.AnnotationReader.<init>(AnnotationReader.java:44) ~[jython-standalone-2.5.3.jar:na]
at org.python.core.imp.readCode(imp.java:219) ~[jython-standalone-2.5.3.jar:na] 

我正在使用Eclipse和grinderstone插件来运行脚本。解释器设置为Jython。 jython解释器设置:

enter image description here

PYTHONPATH:

enter image description here

我无法理解为什么我不能使用随机和字符串模块。模块以IDLE导入,不会引发任何错误。完整日志here

0 个答案:

没有答案