Google cloud platform 在GCP AutoML对象检测中尝试创建新数据集时,必填字段无效错误
我正在跟随快速入门学习。不幸的是,我遇到了一个我无法理解的错误。在第一次执行curl命令时Google cloud platform 在GCP AutoML对象检测中尝试创建新数据集时,必填字段无效错误,google-cloud-platform,google-cloud-automl,Google Cloud Platform,Google Cloud Automl,我正在跟随快速入门学习。不幸的是,我遇到了一个我无法理解的错误。在第一次执行curl命令时 curl -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ "https://automl.googleapis.com/v1beta1/projects/$PROJECT_ID/locations/us-central1/
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 invalid\t",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "parent",
"description": "Required field is invalid"
}
]
}
]
}
}
这似乎是某种模式验证错误,因此可能他们更改了请求正文格式,但我不知道如何更改它。Doh,结果是
PROJECT\u ID
变量实际上没有设置
在使用GCP的API时,有时会出现非常隐晦的错误,这在某种程度上是GCP的典型特征