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 311ee29 commit f6fa9f4Copy full SHA for f6fa9f4
pycardano/serialization.py
@@ -496,7 +496,12 @@ 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(
503
+ f"Can not initialize IndefiniteList from {v}"
504
+ )
505
elif hasattr(t, "__origin__") and (t.__origin__ is dict):
506
t_args = t.__args__
507
if len(t_args) != 2:
0 commit comments