Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
Pyshell.end no se ejecuta. El sistema está atascado en pyshell.on

Pyshell.end no se está ejecutando. Estoy trabajando en este código pero pyshell.end no se ejecuta, aunque he usado next(). Parece que el sistema está atascado en pyshell.on y no se mueve en pyshell.end.

 app.post('/app/blogTitle', (req, res, next)=>{ const keywords = req.body.keywords; const description = req.body.description; var pyshell = new PythonShell('./Python Files/Titles/run.py'); pyshell.send(JSON.stringify(description)); pyshell.on('message', async function (message) { // received a message sent from the Python script arr= await message; if (arr.length!==0){ console.log("Result successfully obtained"); res.status(200).json(arr); } else{ console.log("Some error occurred"); res.status(500).json({ msg: 'Server error' }) } next(); }); // end the input stream and allow the process to exit pyshell.end( function (err) { if (err){ throw err; }; console.log('finished'); }) })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!