You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to pass a python function as argument into a function defined in lua code, it complaining that: LuaError: XXXXXX.lua:44: attempt to call local 'opfunc' (a table value).
I know that by using python.as_function in lua code can make lupa recognize the object as a function, but in my case, the lua code is not possible to change because it's in a third party library, I try to call the function in lupa code.
I checked the code in _lupa.pyx, in the function named py_to_lua, why not just convert the python function into a lua object? or add the python.as_function automatically?
Can anyone help?
The text was updated successfully, but these errors were encountered:
It's hard to say what was the problem exactly without seeing the third party library code which results in the error.
But it's perfectly fine to run python function from lua without any conversions, here is a continuation for your example:
Hi,
I am trying to pass a python function as argument into a function defined in lua code, it complaining that:
LuaError: XXXXXX.lua:44: attempt to call local 'opfunc' (a table value)
.I know that by using python.as_function in lua code can make lupa recognize the object as a function, but in my case, the lua code is not possible to change because it's in a third party library, I try to call the function in lupa code.
I checked the code in _lupa.pyx, in the function named py_to_lua, why not just convert the python function into a lua object? or add the python.as_function automatically?
Can anyone help?
The text was updated successfully, but these errors were encountered: