Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find the function after exec #26

Open
syntomic opened this issue Dec 30, 2022 · 1 comment
Open

Failed to find the function after exec #26

syntomic opened this issue Dec 30, 2022 · 1 comment

Comments

@syntomic
Copy link
Contributor

syntomic commented Dec 30, 2022

I define a function by exec, but invoke this function failed, eg:

interpreter.exec("def f(a):return a");
interpreter.invoke("f", 1);

then throw:

Exception in thread "main" pemja.core.PythonException: <class 'RuntimeError'>: Failed to find the function `f` 
        at pemja.core.PythonInterpreter.invokeOneArgInt(Native Method)
        at pemja.core.PythonInterpreter.invokeOneArg(PythonInterpreter.java:184)
        at pemja.core.PythonInterpreter.invoke(PythonInterpreter.java:93)
@HuangXingBo
Copy link
Collaborator

Thanks a lot for the report. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants