Eel: How to pass (return) multiple values to js without them being glued into one string?

Created on 14 Jan 2019  路  4Comments  路  Source: ChrisKnott/Eel

Hi guys and @ChrisKnott ,

Trying to pass 3 values to the js from python, and it tells me that values come as a string, check this out:

My js code:
image

My Python code:
image

I am sure that python returns them right. But eel seems to be passing it as one string argument. This is what I am getting after running the code.
image

P.S. I surely can split the values from a string and use them, but maybe there's something I am doing wrong while using eel? Anything helps!

All 4 comments

When you return multiple items from Python it actually returns a single tuple.

You need to change it so your callback function takes a single argument, then index from that.

Like pts_count = ret[0] etc

@ChrisKnott Thank you, worked!

Hi @dragon-slayer875. Please feel free to open a news issue asking for help and we can take a look. Including your code will help us help you.

Sorry for the trouble @samuelhwilliams . I resolved the issue just 10 seconds after putting up the comment.
Thanks for the speedy reply and again sorry for the inconvenience.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattiaornaghi picture mattiaornaghi  路  5Comments

datainvestor picture datainvestor  路  5Comments

04fsnape picture 04fsnape  路  4Comments

logxseven picture logxseven  路  6Comments

ClayMDMI picture ClayMDMI  路  4Comments