Skip to main content
Participant
Oct 25, 2025 8:04 AM UTC
Needs More Info

1+4 throws evalScript error...??

Hi all,

 

I've been using a premiere pro extension I've made through a local python server (server.py). The py file also has all the extend script code (using pymiere package, eval_script).

 

I decided to push the server to heroku, and move the eval_script to main.js (which will remain local). But I can't get csInterface.evalScript to work. It keeps through EvalScript error. So I tried a basic script. Literally, 1+4. I tried with and without the return statement.

var csInterface = new CSInterface();
csInterface.evalScript("return 1 + 4;", function(result) {
                            resultElement.textContent = 'Result: ' + result;  // I display the result in html inside premiere
                        });



And

 
csInterface.evalScript("1 + 4;", function(result) {
                            resultElement.textContent = 'Result: ' + result; //again display in html inside ppro
                        });


am I using this wrong..? python's eval_script worked just fine.

3 replies

Bruce Bullis
Legend
Oct 27, 2025 3:40 PM UTC

Can you provide steps which reliably reproduce the problem, without involving any Python?

A solid repro case, using CEP HTML Test Panel, would be ideal...

Translate
Community Manager
Oct 27, 2025 3:28 PM UTC

HI @blackjade-, 
Was it a script that was working and then stopped when you moved stuff around, or has it never worked?  What does the script do?

Translate
Participant
Oct 25, 2025 1:02 PM UTC

 It keeps through throwing EvalScript error.

Also, I've tried passing other things too. Here's my actual code:

 

const data = JSON.parse(response);

// we a string of the extendscript from the python server, tried both with and without escaping slashes for js
const token = data.extendscript || data.extendScript;

var csInterface = new CSInterface();

// Attempt to run extendscript
csInterface.evalScript(script, function(result) {
    resultElement.textContent = 'Result: ' + result;
}

 

Translate