We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4fd27f commit 45c646bCopy full SHA for 45c646b
pycardano/serialization.py
@@ -496,7 +496,10 @@ def _restore_typed_primitive(
496
raise DeserializeException(f"Expected type list but got {type(v)}")
497
return IndefiniteList([_restore_typed_primitive(t, w) for w in v])
498
elif isclass(t) and issubclass(t, IndefiniteList):
499
- return IndefiniteList(v)
+ try:
500
+ return IndefiniteList(v)
501
+ except TypeError:
502
+ raise DeserializeException(f"Can not initialize IndefiniteList from {v}")
503
elif hasattr(t, "__origin__") and (t.__origin__ is dict):
504
t_args = t.__args__
505
if len(t_args) != 2:
0 commit comments