Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform AutoML对象检测接收到无效的JSON负载_Google Cloud Platform_Google Cloud Automl - Fatal编程技术网

Google cloud platform AutoML对象检测接收到无效的JSON负载

Google cloud platform AutoML对象检测接收到无效的JSON负载,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/datasets/${DATASET}:importData -d '{

在尝试运行中的沙拉示例时,我得到一个错误。成功创建数据集后,我运行curl命令导入数据:

curl -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" https://automl.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/us-central1/datasets/${DATASET}:importData -d '{
  "input_config": {
    "gcs_source": {
       "input_uris": [
         "gs://cloud-ml-data/img/openimage/csv/salads_ml_use.csv"
        ]
    }
  }
但是我得到了错误

{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Expected an object key or }.\n  \"input_config\": {\n^",
    "status": "INVALID_ARGUMENT"
  }
}

有什么想法吗?我尝试将
input\u config
更改为
inputConfig
,但无效。

您没有用关闭有效负载。

应该是这样的

curl -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" https://automl.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/us-central1/datasets/${DATASET}:importData -d '{
  "input_config": {
    "gcs_source": {
       "input_uris": [
         "gs://cloud-ml-data/img/openimage/csv/salads_ml_use.csv"
        ]
    }
  }'

我看不出这段代码有任何错误。检查gcs对象是否可访问。它确实存在(它来自外部打开的数据集)。最后,我通过遵循quickstart UI版本()修复了它