-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mistakable error message: Variable not available #186
Comments
Hi Son, a possible speaking error messge would be: if above is not possible, then a generic message could be: Thank you, |
Hi Son, |
Hello Thomas, I will implement this ticket in next 0.11.0 release. Thank you, |
Update: The following line from code example above, is invalid in between:
Because of the decision, not to create parameter names dynamically. Therefore the code example needs to be adapted:
Result:
That's wrong. This is still a type issue, and not a missing variable issue. Expected error message: List indices have to be of type int. |
Hello Thomas, I implemented this ticket and pushed the change to stabi branch. Thank you, |
causes:
This is like expected now. But the same with a string parameter:
causes:
But expected is the same error message like above. |
Hello Holger, Thank you for your finding! I'm going to forward the exception from Python the error message for both cases like below: Thank you, |
Hi Son, that's fine to me. And you should adapt the wording a little bit. Either: list indices must be of type 'int', not 'str' or: list indices must be integers, not strings |
Hi Son, see also #306 Should be aligned. |
Hello Holger, The reason Thank you, |
Hi Son, oops - I was not aware of that. No modification please. |
Hello Holger, I push commit f3df857af39 to solve your review comment. Thank you, |
Retest successful. Issue can be closed. |
integrated in 0.12.1 |
The JSON code:
causes:
Error: 'The variable '${testlist}['1']' is not available!'!
Here I have doubts about the meaning of the single quotes inside the square brackets. Are they allowed/required or not? The requirements are unclear to me.
But I expect that expressions are resolved from innermost to outermost. What should be the order of computation in the code example above?
I expect:
In my opinion it should be possible to provide a corresponding error message, telling that list indices are expected to be of type int.
To tell only that a variable does not exist, does not really help the users.
And independent from this: Quotes should not be accepted as part of parameter names (or dictionary key names). Seems that the JsonPreprocessor still has a common issue with proper handling of quotes inside expressions.
Reference: JPP_0268
The text was updated successfully, but these errors were encountered: