#does anyone know why i am getting this error?
2 messages · Page 1 of 1 (latest)
} else {
saveConversation(msg.body);
exec(`python ml_functions.py "${msg.body}"`, (error, stdout, stderr) => {
if (error) {
console.error(`Error executing Python script: ${error}`);
msg.reply('Error processing the request.');
saveConversation('Error processing the request.', true);
return;
}
if (stderr) {
console.error(`Python script stderr: ${stderr}`);
msg.reply('There was an error with the request.');
saveConversation('There was an error with the request.', true);
return;
}
const response = stdout.trim();
msg.reply(response);
saveConversation(response, true);
});
}
});
client.initialize();