Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yowsup-cli Error: process exited with code 1 #1702

Closed
sebastianet opened this issue Jul 19, 2016 · 1 comment
Closed

yowsup-cli Error: process exited with code 1 #1702

sebastianet opened this issue Jul 19, 2016 · 1 comment

Comments

@sebastianet
Copy link

sebastianet commented Jul 19, 2016

The symptoms are :

/home/pi/semafor/1_sem.js:452
if ( err ) throw err ;
^

Error: process exited with code 1
at terminateIfNeeded (/home/pi/semafor/node_modules/python-shell/index.js:100:23)
at ChildProcess. (/home/pi/semafor/node_modules/python-shell/index.js:88:9)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)

at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

I am calling yowsup-cli from node, with this code :

app.post( '/enviar_msg_whatsapp/ParamTfNum=:req_tf_num', function (req, res) {

 var WhatsApp_Tf_Number = req.params.req_tf_num ;
 console.log( '>>> Menu enviar msg WhatsApp via python. Tf param is (' + WhatsApp_Tf_Number + '). ' ) ;

var python_options = {
mode: 'text',
pythonPath: '/usr/bin/python',
pythonOptions: ['-u'],
scriptPath: '/usr/local/bin',
args: ['demos --debug -c /usr/local/bin/mydetails -s 34666777888 SEMnodeMsg']
} ;

 PythonShell.run( 'yowsup-cli', python_options, function( err, results ) {
      if ( err ) throw err ;
      console.log( '(+) Snd WhatsApp Python results are (%j).', results ) ; // results is an array consisting of messages collected during execution
      var sndRC = String( results ) ;                           
      szResultat = '+++ whatsapp msg sent. RC ('+ sndRC + ').' ;
      res.status( 200 ).send( szResultat ) ;
 } ) ; // run

} ) ; // enviar mensage whatsapp

Thanks for any clue.

Solved using

args: [ 'demos', '-c', '/usr/local/bin/mydetails', '-s', '34666777888', 'Envio des el NODEJS' ]

@skarbat
Copy link

skarbat commented Jul 19, 2016

@sebastianet , could it be that args is supposed to be split into an array?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants