test-fullautomation / python-jsonpreprocessor

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

IndexError: list index out of range (2) #101

Closed HolQue closed 4 months ago

HolQue commented 11 months ago

As per https://github.com/test-fullautomation/python-jsonpreprocessor/issues/86#issue-1791756024 indices (in square brackets) must be placed outside the curly brackets.

The test case:

"list_param" : ["A", "B", "C"],
"val2"       : "${list_param[1]}"

produces the following error message:

list index out of range

This is misleading.

Expected is something like

Invalid syntax: Found index inside curly brackets. Indices in square brackets have to be placed outside the curly brackets.

test-fullautomation commented 9 months ago

@namsonx : What is the status of this issue?

test-fullautomation commented 8 months ago

Hi @namsonx , what is the status of this ticket? Thank you, Thomas

namsonx commented 7 months ago

Hello Holger, Hello Thomas,

I pushed new commit 8015387a3 to stabi branch to check and print out detail error message log. The error message log in this case is: Invalid syntax: Found index inside curly brackets in line '"val2" : "${list_param[1]}"'. Indices in square brackets have to be placed outside the curly brackets.

I also updated the [BADCASE] test cases JPP_0350, JPP_0351, JPP_0352 to adapt new message log.

Thank you, Son

test-fullautomation commented 7 months ago

Hi Son, looks good to me! Thank you, Thomas

HolQue commented 5 months ago

Retest successful. Issue can be closed.

namsonx commented 4 months ago

merged to develop branch

test-fullautomation commented 4 months ago

solved with version 0.10.0