Try ERPNext Buy Support Partners Foundation

Passing list of object but getting unicode in python file. How can i get original value in python file?

I want to get list of dictionary in python file but getting Unicode. How can i solve this ?Capture Capture

Sorry, not to have a good specific example of how to. But here are a couple of useful pages.
Sanitizing data is looking for data other than your own type (you probably know this, but I am mentioning it just in case). Take your sanitizing routine and use it to check for string type… then you want to either cast that unicode string in ascii or just drop it.

https://docs.python.org/3/howto/unicode.html

I hope that helps you solve the problem.

Karl

1 Like

Thank you so much. I just separately push value into 2 array and pass string to python file. Then split it by comma and it solved my problem.

Capture1

1 Like

employees = json.loads(employees). Doesn’t matter if it’s an array or object passed from client side.
You will receive parameters from client side as unicode always.

Thank you so much, It’s working.:heart_eyes: