Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用eclipse和grinder导入随机和字符串模块时出错_Python_Eclipse_Jython_Grinder - Fatal编程技术网

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

Python 使用eclipse和grinder导入随机和字符串模块时出错,python,eclipse,jython,grinder,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

我有一个粉碎机脚本。脚本正在正常工作,但当我想要导入字符串和随机模块时,会引发以下错误:

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] 
2015-01-06 15:51:48356错误PCAA-0:中止进程-Java异常初始化测试脚本
net.grinder.scriptengine.jython.JythonScriptExecutionException:Java异常初始化测试脚本
文件“C:\Grinder\lib\jython-standalone-2.5.3.jar\re$py.class”,第279行,在
文件“C:\Grinder\lib\jython-standalone-2.5.3.jar\string$py.class”,第81行,在
导入字符串
文件“C:\Users\net\u user\workspace\Grinder\Grinder\u\u 1.py”,第2行,在
java.lang.ArrayIndexOutofBounds异常:10
在org.python.objectweb.asm.ClassReader.a(未知源代码)~[jython-standalone-2.5.3.jar:na]
在org.python.objectweb.asm.ClassReader.accept(未知源)~[jython-standalone-2.5.3.jar:na]
在org.python.objectweb.asm.ClassReader.accept(未知源)~[jython-standalone-2.5.3.jar:na]
在org.python.core.AnnotationReader.(AnnotationReader.java:44)~[jython-standalone-2.5.3.jar:na]
在org.python.core.imp.readCode(imp.java:219)~[jython-standalone-2.5.3.jar:na]
我正在使用Eclipse和grinderstone插件来运行脚本。解释器设置为Jython。jython解释器设置:

蟒蛇:

我不明白为什么我不能使用随机和字符串模块。模块以空闲状态导入,不会引发任何错误。完整日志