test-fullautomation / python-jsonpreprocessor

A preprocessor for json files
Apache License 2.0
2 stars 2 forks source link

Error messages (28) #326

Open HolQue opened 3 weeks ago

HolQue commented 3 weeks ago

Previously this code

{
   "indexP" : 0,
   "newparam" : ${indexP}[${indexP}]
}

caused newparam to have string value '0[0]'.

With latest changes of the JsonPreprocessor this changes to newparam having integer value 0.

Both is wrong. The correct error message would be

TypeError: 'int' object is not subscriptable

namsonx commented 3 days ago

Hello Holger,

The change for this ticket is pushed to stabi branch. The error message now is: Exception: Could not resolve expression '${indexP}[0]'. Reason: 'int' object is not subscriptable

Thank you, Son