I received the error message with the official sample project from FastAPI. So the previous tip from Stat Atan works! Simply use the
from pedantic import BaseModel
in
from pedantic.v1 import Basemodel
and it works, no downgrade necessary!