gpt4 book ai didi

c++ - 调用 google::cloud::storage::Client 时出现 json.exception.parse_error

转载 作者:行者123 更新时间:2023-11-30 02:18:05 25 4
gpt4 key购买 nike

https://github.com/GoogleCloudPlatform/google-cloud-cpp/ https://github.com/GoogleCloudPlatform/google-cloud-cpp/blob/master/google/cloud/storage/examples/storage_quickstart.cc

构建所有可用库后,运行 storage_quickstart

/home/google-cloud-cpp/build-output/google/cloud/storage/examples/storage_quickstart bucket_name project_id

得到这个

Standard C++ exception raised: [json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input; expected '[', '{', or a literal

错误在

namespace gcs = google::cloud::storage;
gcs::Client client;

有什么想法吗?

最佳答案

您的 GOOGLE_APPLICATION_DEFAULT_CREDENTIALS 似乎未设置,或者指向格式错误的文件。希望这里的文档:

https://googlecloudplatform.github.io/google-cloud-cpp/latest/storage/index.html

可以帮助您解决这个问题。如果您需要更多帮助,请随时在 GitHub 页面中提出错误。

关于c++ - 调用 google::cloud::storage::Client 时出现 json.exception.parse_error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52625564/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com