patrickjquinn / P-Brain.ai-RasPi

Headless Client for P-Brain.ai Virtual Assistant on Raspberry Pi
22 stars 11 forks source link

events.js:160 Error #2

Closed h4ckd0tm3 closed 7 years ago

h4ckd0tm3 commented 7 years ago

Server side works on the pi! The client works in browser but not on the pi.

Got this:

pi@Amber ~/P-Brain.ai-RasPi $ sudo sh run.sh

P-Brain.ai-Client@0.5.3 start /opt/P-Brain.ai-client node client.js

P-Brain Says: Say 'Hey Brain','Brain' or 'Okay Brain' followed by your command! P-Brain Says: You can also type your command into the terminal! Hey Brain, What is the weather in Paris? P-Brain Says: It is currently 8° and Clear in paris? events.js:160 throw er; // Unhandled 'error' event ^

Error: spawn festival ENOENT at exports._errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:359:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

npm ERR! Linux 4.1.19-v7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! P-Brain.ai-Client@0.5.3 start: node client.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the P-Brain.ai-Client@0.5.3 start script 'node client.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the P-Brain.ai-Client package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node client.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs P-Brain.ai-Client npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls P-Brain.ai-Client npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /opt/P-Brain.ai-client/npm-debug.log

npm-debug.log

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@3.10.10 3 info using node@v6.9.4 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle P-Brain.ai-Client@0.5.3~prestart: P-Brain.ai-Client@0.5.3 6 silly lifecycle P-Brain.ai-Client@0.5.3~prestart: no script for prestart, continuing 7 info lifecycle P-Brain.ai-Client@0.5.3~start: P-Brain.ai-Client@0.5.3 8 verbose lifecycle P-Brain.ai-Client@0.5.3~start: unsafe-perm in lifecycle true 9 verbose lifecycle P-Brain.ai-Client@0.5.3~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/opt/P-Brain.ai-client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 10 verbose lifecycle P-Brain.ai-Client@0.5.3~start: CWD: /opt/P-Brain.ai-client 11 silly lifecycle P-Brain.ai-Client@0.5.3~start: Args: [ '-c', 'node client.js' ] 12 silly lifecycle P-Brain.ai-Client@0.5.3~start: Returned: code: 1 signal: null 13 info lifecycle P-Brain.ai-Client@0.5.3~start: Failed to exec start script 14 verbose stack Error: P-Brain.ai-Client@0.5.3 start: node client.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:877:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid P-Brain.ai-Client@0.5.3 16 verbose cwd /opt/P-Brain.ai-client 17 error Linux 4.1.19-v7+ 18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 19 error node v6.9.4 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error P-Brain.ai-Client@0.5.3 start: node client.js 22 error Exit status 1 23 error Failed at the P-Brain.ai-Client@0.5.3 start script 'node client.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the P-Brain.ai-Client package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error node client.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs P-Brain.ai-Client 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls P-Brain.ai-Client 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

patrickjquinn commented 7 years ago

Excellent, I know how to fix this :) give me two minutes and i'll have it solved and then if you could check back and let me know i'd greatly appreciate it?

patrickjquinn commented 7 years ago

I've updated the 'provision.sh' to include some missing dependencies! if you're not using provision.sh try 'sudo apt-get install -y festival festvox-kallpc16k' which should solve the issues!

h4ckd0tm3 commented 7 years ago

Same Problem, trying to install it on a fresh raspian!

patrickjquinn commented 7 years ago

Let me debug this, this shouldn't be happening now that I've added the new dependencies, gimme 10 :)

h4ckd0tm3 commented 7 years ago

UPDATE Tried to install it on a clan Raspian Jessie and it's working, sort of.

Now getting this error:

`pi@raspberrypi:~/P-Brain.ai-RasPi $ sudo sh run.sh

P-Brain.ai-Client@0.5.3 start /opt/P-Brain.ai-client node client.js

P-Brain Says: Say 'Hey Brain','Brain' or 'Okay Brain' followed by your command! P-Brain Says: You can also type your command into the terminal! Hey Brain, What is the weather in Paris P-Brain Says: It is currently 8° with Clouds in paris Error: SIOD ERROR: unbound variable : Alex

at Socket.<anonymous> (/opt/P-Brain.ai-client/node_modules/say/index.js:84:14)
at Socket.g (events.js:291:16)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:548:20)

(node:9380) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: SIOD ERROR: unbound variable : Alex `

I could ask queries but the error message keeps poping up.

patrickjquinn commented 7 years ago

Ah okay, it's the fact that that "voice" isn't available on Linux, I'll find one that works everywhere now.

h4ckd0tm3 commented 7 years ago

Nice! Glad i could help! :)

patrickjquinn commented 7 years ago

Okay this should be fixed now on RasPi, i'll close for now and if its not working with the last commit let me know and i'll re-open :)