尝试在 GCP AutoML 对象检测中创建新数据集时出现"必填字段无效"错误



我正在遵循 AutoML 对象检测的快速入门。不幸的是,我遇到了一个我无法弄清楚的错误。在第一个卷曲命令

curl -X POST 
-H "Authorization: Bearer $TOKEN" 
-H "Content-Type: application/json" 
"https://automl.googleapis.com/v1beta1/projects/$PROJECT_ID/locations/us-central1/datasets" -d '{
"display_name": "dataset_name",
"image_object_detection_dataset_metadata": {
}
}'

我收到此错误:

{
"error": {
"code": 400,
"message": "List of found errors:t1.Field: parent; Message: Required field is invalidt",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "parent",
"description": "Required field is invalid"
}
]
}
]
}
}

这似乎是某种架构验证错误,所以也许他们更改了请求正文格式,但我不知道如何更改它。

Doh,事实证明实际上并没有设置PROJECT_ID变量。

GCP 有点典型,在通过他们的 API 工作时,您有时会遇到非常神秘的错误。

相关内容

最新更新