Google NLP AutoML Java client The provided location ID is not valid

独自空忆成欢 提交于 2019-12-11 08:04:06

问题


I checked out from GitHub Java samples for GoogleCloudPlatform. I am trying to run this example for AutoML NLP prediction after I successfully trained my language model. I am able to perform prediction in the Google Cloud Console. Now I am trying to perform prediction from Java client with this example https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/language/automl/src/main/java/com/google/cloud/language/samples/PredictionApi.java

I created service account for my project, set GOOGLE_APPLICATION_CREDENTIALS for my JSON key and I use correct projectId, modelId and computeRegion arguments in the PredictionApi.java example. After I run it in Idea, this is error that I get:

Exception in thread "main" com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: List of found errors: 1.Field: name; Message: The provided location ID is not valid.

Does somebody have clue what could be wrong or what am I missing in my configuration? (to summarize it I have project, service account, trained model, set GOOGLE_PROJECT_CREDENTIALS)


回答1:


What computeRegion did you set? Currently, only us-central1 is supported in automl API.



来源:https://stackoverflow.com/questions/54329128/google-nlp-automl-java-client-the-provided-location-id-is-not-valid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!