Skip to main content
polypic
Participant
January 13, 2024
Question

child process acts stange premiere pro cep on m1

  • January 13, 2024
  • 0 replies
  • 222 views

Hi 
I created a cep to call an executable Python script that I compiled 
everything works fine I can run the executable file and get buffer data
however, when I added a media path, I got back an empty buffer!!

this happened just on (M1 Macos Monterey) buffer is empty
only when I add the media path but I can try to run the file,
it works also when tried to run on nodejs outside the cep framework, and it works fine on the same machine 

on my old laptop, it works fine 
MacBook bro 2018 Macos Venture it works fine, and I get data inside the buffer (buffy) 

 

const { execFile, spawn } = require('child_process');
const media = '/Users/Documents/example.mp4';
// this is my compiled executable python script 
const pymain = '/Users/Documents/__main__/__main__' ; 

var argarray = [media, '--info'];
const child = spawn(pymain, argarray);

var buffy='' ; 

child.stdout.on('data', function (data) {

	buffy += data.toString() ; 

});

child.on('close', function (exitcode) {
	alert(buffy);
});

process.on('exit', function () {
	child.kill()
})

 

 
what I'm missing ?!

This topic has been closed for replies.