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
if executed on Flyte (not locally), by passing an empty list to list_of_stuff, it will fail with the following error:
[4/4] currentAttempt done. Last Error: USER::Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/flyte-workflows-104TnIye-py3.8/lib/python3.8/site-packages/flytekit/bin/entrypoint.py", line 94, in _dispatch_execute
outputs = task_def.dispatch_execute(ctx, idl_input_literals)
File "/root/.cache/pypoetry/virtualenvs/flyte-workflows-104TnIye-py3.8/lib/python3.8/site-packages/flytekit/core/base_task.py", line 402, in dispatch_execute
native_inputs = TypeEngine.literal_map_to_kwargs(exec_ctx, input_literal_map, self.python_interface.inputs)
File "/root/.cache/pypoetry/virtualenvs/flyte-workflows-104TnIye-py3.8/lib/python3.8/site-packages/flytekit/core/type_engine.py", line 297, in literal_map_to_kwargs
return {k: TypeEngine.to_python_value(ctx, lm.literals[k], v) for k, v in python_types.items()}
File "/root/.cache/pypoetry/virtualenvs/flyte-workflows-104TnIye-py3.8/lib/python3.8/site-packages/flytekit/core/type_engine.py", line 297, in <dictcomp>
return {k: TypeEngine.to_python_value(ctx, lm.literals[k], v) for k, v in python_types.items()}
File "/root/.cache/pypoetry/virtualenvs/flyte-workflows-104TnIye-py3.8/lib/python3.8/site-packages/flytekit/core/type_engine.py", line 275, in to_python_value
return transformer.to_python_value(ctx, lv, expected_python_type)
File "/root/.cache/pypoetry/virtualenvs/flyte-workflows-104TnIye-py3.8/lib/python3.8/site-packages/flytekit/core/type_engine.py", line 342, in to_python_value
return [TypeEngine.to_python_value(ctx, x, st) for x in lv.collection.literals]
AttributeError: 'NoneType' object has no attribute 'literals'
Expected behavior
The task should return 0
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Task fails to run if empty list is passed as argument.
Take this task
if executed on Flyte (not locally), by passing an empty list to
list_of_stuff
, it will fail with the following error:Expected behavior
The task should return
0
Screenshots
The text was updated successfully, but these errors were encountered: