You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the help of the FlexibleCalculationState state, it requires a lambda function with a list argument (e.g., lambda x: x[0]^2 + x[1]^2) but that gives following error message:
python <lambda>() got an unexpected keyword argument
What works though is a lambda function with multiple arguments (e.g., lambda x1,x2: x1^2 + x2^2). However, the behavior cannot be saved because the checking function says:
Unable to save behavior: parameter calculation of state [...] has invalid value
My current workaround is to put any acceptable value in the calculation parameter field and put the correct, desired lambda function in the source code later. But this is quite tedious because it is always overwritten when the behavior is changed with the GUI.
The text was updated successfully, but these errors were encountered:
Bad news: This impacts a significant amount of code in the behavior parsing and checking. I do not plan to make this change to the flexbe_app
Good news: Next week (June 2024), we plan to release the beta version of a new flexbe_webui for iron, jazzy, and rolling that has several improvements to the state machine editing and checking, and I have tested a fix to handle more complex lambda expressions. It would be possible for a motivated individual to pick out the changes and port to flexbe_app, but I plan to devote development time to flexbe_webui going forward.
Please check out the latest version of flexbe_webui (beta-enhanced for older version 3.x flexbe_behavior_engine) or main for newest vs. 4.0.0 release. I plan to close this ticket soonish if I don't get further feedback.
According to the help of the FlexibleCalculationState state, it requires a lambda function with a list argument (e.g.,
lambda x: x[0]^2 + x[1]^2
) but that gives following error message:What works though is a lambda function with multiple arguments (e.g.,
lambda x1,x2: x1^2 + x2^2
). However, the behavior cannot be saved because the checking function says:My current workaround is to put any acceptable value in the calculation parameter field and put the correct, desired lambda function in the source code later. But this is quite tedious because it is always overwritten when the behavior is changed with the GUI.
The text was updated successfully, but these errors were encountered: