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
CRITICAL, MainThread, error_handler.py:55, An exception occured: <class 'TypeError'>: Argument `schema` of function <function stateful_set_update_strategy_tests at 0x7f553ed792d0> got type <class 'acto.schema.object.ObjectSchema'> but expected type <class 'acto.schema.string.StringSchema'>.
Causes
For this operator, updateStrategy is a string (not an object like in the native schema).
generator_candidates in fact has two elements: one is the exact match for updateStrategy; the second is for type String. But Acto only uses the first candidate with the highest priority and fails type check later here.
Possible solutions
The quoted code snippet seems to have certain design that allows a few alternative generators (e.g. it sorts the whole candidate list instead of directly picking up the max or min) but ends up with trying only one. Maybe we can add some try-except statement there.
To work around it in my 523 homework, I used the following
How to reproduce
It will crash with this log message:
Causes
For this operator,
updateStrategy
is a string (not an object like in the native schema).At this stage of Acto code:
acto/acto/input/test_generators/generator.py
Lines 241 to 246 in 92fb7c3
generator_candidates
in fact has two elements: one is the exact match forupdateStrategy
; the second is for typeString
. But Acto only uses the first candidate with the highest priority and fails type check later here.Possible solutions
The quoted code snippet seems to have certain design that allows a few alternative generators (e.g. it sorts the whole candidate list instead of directly picking up the max or min) but ends up with trying only one. Maybe we can add some
try
-except
statement there.To work around it in my 523 homework, I used the following
The text was updated successfully, but these errors were encountered: