Open dljgs1 opened 6 years ago
I have the same problem.Do you find some solutions? In addition,as python-shell's documentation mentioned, or you can use require like so: let {PythonShell} = require('python-shell').
aaa@user-ProLiant-ML350-Gen9:~/PPDL/SERVER$ node MIDDLE-server.js logReg.js /home/aaa/xxn/bin/python /node_modules/grpc/src/grpc_extension.js:45 throw error; ^
Error: The gRPC binary module was not installed. This may be fixed by running "npm rebuild"
Original error: Cannot find module '/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node'
at Object.
events.js:167 throw er; // Unhandled 'error' event Error: write EPIPE at WriteWrap.afterWrite [as oncomplete] (net.js:788:14) Emitted 'error' event at: at onwriteError (_stream_writable.js:431:12) at onwrite (_stream_writable.js:456:5) at _destroy (internal/streams/destroy.js:40:7) at Socket._destroy (net.js:613:3) at Socket.destroy (internal/streams/destroy.js:32:8) at WriteWrap.afterWrite [as oncomplete] (net.js:790:10)
node version:v10.10.0
modified: MIDDLE-server.js line 180:var test = new PythonShell.PythonShell('./testset/testIt.py');
or it will throw TypeError: "PythonShell is not a constructor"