Azure-Samples / Azure-Samples/cognitive-services-quickstart-code

The analyze request is invalid. Ensure that each filter key is not null, empty or longer than 128 and that the length of all keys is less than 1024 characters

Abierto
#50 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
389
Forks
556
Merge medio
3 d 12 h
PR fusionados (30 d)
1

Descripción

When running the analyze function using a list of keys to filter the data, I am getting the error below.

> "{\"error\":{\"code\":\"1010\",\"message\":\"The analyze request is invalid. Ensure that each filter key is not null, empty or longer than 128 and that the length of all keys is less than 1024 characters.\"}}"

```
AnalyzeResult result = await formClient.AnalyzeWithCustomModelAsync(modelId, fileStream, contentType: "application/pdf", GetKeyListByProvince(province));

private IList GetKeyListByProvince(Province province)
{
var keys = new List();
switch (province)
{
default:
case Province.BC:
keys = new List{
"Name of Company:", "Incorporation Number:", "Business Number:", "Last Name, First Name, Middle Name:", "Jurisdiction:", "Delivery Address:", "Entity Status:"
};
break;
}
return keys;
}
```

It works fine when analyzing the data without the list of keys, but we need to narrow it down to only the ones required.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the AnalyzeWithCustomModelAsync call and the GetKeyListByProvince key list shown in the report. Compare the supplied keys with the service's documented filter-key constraints and determine whether the request can succeed with these filters; no source file or test is named, so a complete fix or documented limitation would establish what is done.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
azure, csharp
Área
api, cloud
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.