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

317
Vistas
JS doesn't recognize a python function (using eel)

This is my JS function:

async function get_days(){
    **b = await eel.get_events('ofek')();**
    alert(b);
    startPoint = new Date(year, month - 1, 1).getDay(); // 0=Sunday
    numberOfDaysInMonth = new Date(year, month, 0).getDate(); // setting the number of days in the current month
    numberOfDaysInPrevMonth = new Date(year, month - 1, 0).getDate(); // setting the number of days in the prev month
    content = "";
    for (j = 1; j <= startPoint; j++) {
        content += "<li class='prev_next'>" + (numberOfDaysInPrevMonth - startPoint + j) + "</li>";

    }
    // TODO
    for (i = 1; i <= numberOfDaysInMonth; i++){
        if (i == currentDate.getDate() && month == currentDate.getMonth() + 1 && year == currentDate.getFullYear()){
            content += "<li onclick='return open_create_event_screen();' class='active'>" + i + "</li>";
        }
        else if (i > currentDate.getDate() && month < currentDate.getMonth() + 1 && year == currentDate.getFullYear()) { // TODO
            content += "<li onclick='return open_create_event_screen();'>" + i + "</li>";
        }
        else { // if the date has already passed - no ability to create event
            content += "<li>" + i + "</li>";
        }
    }

    numberOfDaysNextMonth = 7 - (new Date(year, month, 0).getDay() + 1);
    for (n = 1; n <= numberOfDaysNextMonth; n++) {
        content += "<li class='prev_next'>" + n + "</li>";
    }

    daysDiv.innerHTML = content;
    document.getElementById("current_month").innerHTML = monthNames[month - 1];
    document.getElementById("current_year").innerHTML = year;

}

This is my python code where I call to the function get_events (using eel):

@eel.expose
def get_events(username):
    print("get_events")
    name_of_events = client.get_events(username)
    print(name_of_events)
    return name_of_events

The problem is in the bolded line. The ERROR is: 'Uncaught (in promise) ReferenceError: eel is not defined'. Does someone know why it thinks eel is not definded?

about 4 years ago · Santiago Trujillo
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