gpt4 book ai didi

java - Google 预测 API - dataStoreFactory - setPermissionsToOwnerOnly

转载 作者:行者123 更新时间:2023-12-01 11:21:24 24 4
gpt4 key购买 nike

运行 PredicitonSample.java 我已使用 client_secrets.json 设置了所有内容,当我使用所有凭据运行该文件时,我收到此错误:

com.google.api.client.util.store.FileDataStoreFactory setPermissionsToOwnerOnly
WARNING: unable to change permissions for everybody: C:\Users\100018349\.store\prediction_sample
Jul 01, 2015 4:19:02 PM com.google.api.client.util.store.FileDataStoreFactory setPermissionsToOwnerOnly
WARNING: unable to change permissions for owner: C:\Users\100018349\.store\prediction_sample
java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at PredictionEngine.authorize(PredictionEngine.java:96)
at PredictionEngine.main(PredictionEngine.java:262)

PredicitonSample.java 的代码可以在此 github 存储库中找到: https://github.com/gxlzlihao/GooglePredictionAPISample/blob/master/src/main/java/com/google/api/services/samples/prediction/cmdline/PredictionSample.java

最佳答案

试试这个:

/** Directory to store user credentials. */

private static final java.io.File DATA_STORE_DIR =
new java.io.File(System.getProperty("user.home"), ".store/analytics_sample");

private static FileDataStoreFactory dataStoreFactory;

dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);

关于java - Google 预测 API - dataStoreFactory - setPermissionsToOwnerOnly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31184437/

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