aelveborn / Wii-Scale

Turns your Wii Balance Board into a scale and presents your weight on a responsive website. Runs Linux and works on your Raspberry Pi.
http://aelveborn.github.io/Wii-Scale/
GNU General Public License v2.0
116 stars 27 forks source link

Error. #16

Closed marianozunino closed 7 years ago

marianozunino commented 7 years ago

Hi, I'm getting this error. I included the debug log.

> wii-scale@0.0.4 start /home/forbi/Wii-Scale
> node scripts/start.js

Listening on 0.0.0.0:1991
lokijs loadDatabase : Database not found
/home/forbi/Wii-Scale/scripts/start-python.js:42
        if (error) throw error;
                   ^

Error:   File "wii-scale/wii-scale.py", line 96
    print "wii-scale.py -h <host> -p <port> -c <calibration kg> -a <mac-addres>"
                                                                               ^
SyntaxError: Missing parentheses in call to 'print'

    at PythonShell.parseError (/home/forbi/Wii-Scale/node_modules/python-shell/index.js:138:17)
    at ChildProcess.<anonymous> (/home/forbi/Wii-Scale/node_modules/python-shell/index.js:67:28)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

npm ERR! Linux 4.8.13-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v7.4.0
npm ERR! npm  v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! wii-scale@0.0.4 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wii-scale@0.0.4 start script 'node scripts/start.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 wii-scale package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/start.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs wii-scale
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls wii-scale
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/forbi/Wii-Scale/npm-debug.log

npm-debug.txt

sahoahfoa commented 7 years ago

@forbi The error "SyntaxError: Missing parentheses in call to 'print'" tells it all. You have python 3 installed. In Python 3 the print statement was replaced with a print() function. You need to have python 2.7 installed.

marianozunino commented 7 years ago

@sahoahfoa

Getting this now:

wii-scale@0.0.4 start /home/forbi/Wii-Scale
> node scripts/start.js

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn python 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)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3
sahoahfoa commented 7 years ago

@forbi Did a quick search and found this --> http://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js

The python command probably isn't on the path for node to execute

aelveborn commented 7 years ago

No updates since January. Closing issue.