opendatalab / LabelLLM

The Open-Source Data Annotation Platform
Apache License 2.0
551 stars 44 forks source link

本地debug,报pydantic的KeyError: 'UUID' #15

Open fenglvming opened 3 months ago

fenglvming commented 3 months ago

启动方式,本地python app/main.py

File "/opt/anaconda3/envs/labelllm/lib/python3.11/site-packages/pydantic/_internal/_core_utils.py", line 197, in walk return f(schema, self._walk) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/labelllm/lib/python3.11/site-packages/pydantic/_internal/_core_utils.py", line 441, in collect_refs return recurse(s, collect_refs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/labelllm/lib/python3.11/site-packages/pydantic/_internal/_core_utils.py", line 200, in _walk schema = self._schema_type_to_method[schema['type']](schema.copy(), f)


KeyError: 'UUID'
lacia-hIE commented 2 months ago

可以提供更多有效信息吗,例如完整的启动步骤

ZhongQiyu commented 1 month ago

UUID是百度的标记算法, 你看一下怎么弄

HycJack commented 2 weeks ago

根据 beanie 这个库的 issues,将models中各个类的id, Indexed(UUID, unique=True) 改成 Annotated[UUID, Indexed(unique=True)]可以解决这个问题。