PyNode
PyNode copied to clipboard
If python file is named "test.py", cannot call function in python file.
PyObject_GetAttrString return Null when calling a function in a python file named "test.py"
I observe the same behaviour, when I try to reproduce this example with a test.py file, I get the error:
/app/index.js:18
pynode.call('add', 1, 2, (err, result) => {
^
Error: Could not find function name / function not callable
at Object.<anonymous> (/app/index.js:18:8)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47