so im currently coding something with modal (modal.com) that uses python subprocesses to run these scripts, but well, everytime the modal subprocess starts, it gives me the error: “‘charmap’ codec can’t encode character ‘u2713’ in position 0: character maps to “, why? because somehow i cant encode emojis that modal gives me as subprocess logs for some reasons.
I tried about everything. Checking vscode encoding settings, asking TONS of AI, even tried to just dont log it, and just remove it, but that just stops making it work at all. Here is the code:
const scriptPath = path.resolve(
__dirname,
`../scripts/${config.stories[type].build_file}`
);
const pythonProcess = spawn("modal", ["run", scriptPath, "--job-id", jobId]);
pythonProcess.stdout.on('data', (data) => { //mainly at here is the error
console.log(`${logPrefix} ${data.toString('utf8')}`);
});
pythonProcess.stderr.on('data', (data) => {
console.log(`${logPrefix} ${data.toString('utf8')}`);
});
I appreciate ANY kind of help, thanks in advance!
Daniel Otto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.