tomasonjo / blogs

Jupyter notebooks that support my graph data science blog posts at https://bratanic-tomaz.medium.com/
1.37k stars 355 forks source link

RuntimeError: no validator found for <class '__main__.Node'>, see `arbitrary_types_allowed` in Config #43

Open LINYiyangCUHK opened 1 month ago

LINYiyangCUHK commented 1 month ago

RuntimeError: no validator found for <class 'main.Node'>, see arbitrary_types_allowed in Config

Jiancong commented 3 weeks ago

RuntimeError: no validator found for <class 'main.Node'>, see arbitrary_types_allowed in Config

Add following code snippit

class BaseModel(PydanticBaseModel):
    class Config:
        arbitrary_types_allowed = True