Tim Bauer
03/15/2022, 3:08 PMList[Dict[str, pd.DataFrame]]
and get the following error:
File ".../flytekit/core/type_engine.py", line 810, 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'
Flytekit version 0.31.0 - more context in commentslv
It's of type <class 'flytekit.models.literals.Literal'>
and its repr looks like this. Seems good.
map {
literals {
key: "test"
value {
scalar {
schema {
uri: "/tmp/flyte/20220315_160809/raw/c1a4e74d72cf284e9ca6d9a11e3fabed"
type {
}
}
}
}
}
literals {
key: "train"
value {
scalar {
schema {
uri: "/tmp/flyte/20220315_160809/raw/d529c0a999b5bdc655ac891f37e56d07"
type {
}
}
}
}
}
literals {
key: "val"
value {
scalar {
schema {
uri: "/tmp/flyte/20220315_160809/raw/9479a5b5a6c48acdc882d17abb676161"
type {
}
}
}
}
}
}
But yeah its .collection
attribute is NoneKetan (kumare3)
Tim Bauer
03/15/2022, 3:20 PMtype_engine.py
line 808-810
def to_python_value(self, ctx: FlyteContext, lv: Literal, expected_python_type: Type[T]) -> typing.List[T]:
st = self.get_sub_type(expected_python_type)
return [TypeEngine.to_python_value(ctx, x, st) for x in lv.collection.literals]
Ketan (kumare3)
Tim Bauer
03/15/2022, 3:24 PMKetan (kumare3)
Tim Bauer
03/16/2022, 2:00 PM