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
Traceback (most recent call last):
File "pydantic_asdict_demo.py", line 14, in <module>
asdict(B({A("x"):"y"}))
File "/Users/dan/miniconda3/envs/py38/lib/python3.8/dataclasses.py", line 1073, in asdict
return _asdict_inner(obj, dict_factory)
File "/Users/dan/miniconda3/envs/py38/lib/python3.8/dataclasses.py", line 1080, in _asdict_inner
value = _asdict_inner(getattr(obj, f.name), dict_factory)
File "/Users/dan/miniconda3/envs/py38/lib/python3.8/dataclasses.py", line 1110, in _asdict_inner
return type(obj)((_asdict_inner(k, dict_factory),
TypeError: unhashable type: 'dict'
The text was updated successfully, but these errors were encountered:
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:Thanks for all of your work on pydantic - it has been immensely valuable.
Bug report for
dataclasses
includingDict
with otherdataclasses
as keys, failing to rundataclasses.asdict
.Yields:
The text was updated successfully, but these errors were encountered: