PyNode icon indicating copy to clipboard operation
PyNode copied to clipboard

If python file is named "test.py", cannot call function in python file.

Open e-gloo opened this issue 5 years ago • 1 comments

PyObject_GetAttrString return Null when calling a function in a python file named "test.py"

e-gloo avatar Jan 27 '20 15:01 e-gloo

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

fr4nco1s avatar Apr 17 '21 10:04 fr4nco1s