Baidu-AIP/python-sdk

相似图像搜索添加图片接口报错

lx1054331851 opened this issue · 0 comments

python代码如下:

for file in os.listdir(path):
    brief = {'name': file}
    image_path = f'{path}/{file}'
    with open(image_path, 'rb') as f:
        img = f.read()
    r = client.similarAdd(img, brief)
    print(image_path, r)

报错信息如下:

{'log_id': 2269617344673788957, 'error_code': 216101, 'error_msg': 'param brief not exist'}