Open HolQue opened 1 month ago
Code:
"intParam" : 1, "dictParam" : {"A" : 1}, "param" : ${intParam}[${dictParam}]
Result:
Error: 'Invalid index or dictionary key in parameter '${intParam}[${dictParam}]'. The datatype of variable '${dictParam}' have to 'int' or 'str'.'!
That's wrong. The data type of ${dictParam} is irrelevant. Because of ${intParam} is of data type int. And integers cannot have an index or a key.
${dictParam}
${intParam}
int
The same in pure Python:
intParam = 1 dictParam = {"A" : 1} param = intParam[dictParam]
causes:
TypeError: 'int' object is not subscriptable
Either you take over this original error message from Python interpreter or you provide an own interpretation, something like:
TypeError: Integers cannot have an index or a key.
Code:
Result:
Error: 'Invalid index or dictionary key in parameter '${intParam}[${dictParam}]'. The datatype of variable '${dictParam}' have to 'int' or 'str'.'!
That's wrong. The data type of
${dictParam}
is irrelevant. Because of${intParam}
is of data typeint
. And integers cannot have an index or a key.The same in pure Python:
causes:
TypeError: 'int' object is not subscriptable
Either you take over this original error message from Python interpreter or you provide an own interpretation, something like:
TypeError: Integers cannot have an index or a key.