-2

This is my JS function:

async function get_events_names() {
    var events = await eel.get_events('ofek')();

    var eve = events[0]['event_name'];
    return eve;
}

This is my python function:

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

HTML line: <button onclick="return get_events_names();">Click Me</button> When the button is clicked, get_events_names() function should call the python function but it returns this - [Object Promise]. What could be the problem?

ofek tal
  • 5
  • 3

0 Answers0