Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

741
Vistas
Uncaught ReferenceError: require is not defined and Uncaught ReferenceError: Cannot access 'PythonShell' before initialization at electron

This is an electron app and I am trying to execute one python file that just prints "hello world through javascript. I am getting two errors: error 1: main.js:1 Uncaught ReferenceError: require is not defined

error 2: Uncaught ReferenceError: Cannot access 'PythonShell' before initialization

this is the javascript code:

let {PythonShell} = require('python-shell');

function exec_py(){
    console.log("am in");
    PythonShell.run("main_script.py", null, function(err,result){
    console.log(result)
})

}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda