正在为获取nullPythonInterpreter.get()使用Jython时

2024-09-28 20:18:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用Jython尝试调用Python文件中的某个方法。 我收到这个信息时出错了

[ERROR]  - Ambiguous method overloading for methodorg.python.util.PythonInterpreter#exec.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.String]
[class org.python.core.PyObject]

这是我的Java代码

^{pr2}$

打印结果为空。所以我想我的问题是找不到方法。这是我的Python代码。我正在访问LoginPage类从Page对象类继承的方法。在

^{3}$

所以我想知道有没有其他方法可以使用Jython的Python解释器?在


Tags: 文件to方法代码信息forutilerror