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 "<stdin>", line 1, in <module>
File "pydantic/main.py", line 506, in pydantic.main.BaseModel.json
File "/usr/lib/python3.8/json/__init__.py", line 234, in dumps
return cls(
File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "pydantic/json.py", line 65, in pydantic.json.pydantic_encoder
TypeError: Object of type 'NameEmail' is not JSON serializable
The text was updated successfully, but these errors were encountered:
@samuelcolvin hey I'm trying to fix this bug and I'm encountering the tricky conditional imports thing. Would it be easier to move NameEmail to pydantic/types.py like SecretStr?
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:This issue was mentioned in #462, but was only solved for the case of SecretStr, NameEmail was left unsolved.
I get:
The text was updated successfully, but these errors were encountered: