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
using Bar.schema().dumps(Bar()) gives me the following error:
Traceback (most recent call last):
File "dataclass_test.py", line 20, in <module>
Bar.schema().dumps(Bar())
File "~/.venv/venv/lib/python3.6/site-packages/dataclasses_json/api.py", line 100, in schema
infer_missing)
File "~/.venv/venv/lib/python3.6/site-packages/dataclasses_json/mm.py", line 90, in _make_default_fields
cls)
File "~/.venv/venv/lib/python3.6/site-packages/dataclasses_json/mm.py", line 105, in _make_default_field
type_arg = type_.___args__[0]
AttributeError: type object 'List' has no attribute '___args__'
Process finished with exit code 1
However, it works when the type of foos is a List of another dataclass_json, like this:
Consider the following dataclass:
using
Bar.schema().dumps(Bar())
gives me the following error:However, it works when the type of
foos
is aList
of anotherdataclass_json
, like this:So something seems to be off with types and field initializers
I am using
dataclasses-json==0.2.1
The text was updated successfully, but these errors were encountered: