I cant seem to find a way to read objectWrapper with python. Flow is → rowData.toDict() → adding one new property → sending it to modal into button value → pushing button sends value to message handler and here I have problem reading it
I got error - Error running Page/Dashboard@C/root.onMessageReceived(self, payload): TypeError: unicode indices must be integers
The only thing I can see wrong is u'MinutesPlanned_ForOperator': None. JSON uses null. Do you need to convert? You could do this with null = None in your code
Hi, thanks for reply but how can I access those key values ? I dont know how to read key values. The ignition says type of this object is <type 'unicode'>
I figured it out, I had to encode dictionary to json string, then it was saved as string, then was passed between components and then I decoded it again to dictionary.
At first I used it as dictionary but the parameter was set to string so ignition wrapped it in the object and therefore I could not decode it
Whenever I run across this issue, usually casting the entire payload to a dictionary type removes the object wrapper and allows for normal scripting interactions.
but the problem was I was sending it as a Value not as an object. We have one component from Projects which is inherited and the component there has input parameter Value, so whenever I send there the Dictionary it got wrapped, because Value != Object i think, or I am understanding something wrong ?
if you are passing along a dict "rowData.toDict() " than it should work.
i cant really say what your Value means or is without seeing some code.
But you really shouldnt have to decode/encode it with json