gpt4 book ai didi

java - IOException : unexpected response from remote api

转载 作者:行者123 更新时间:2023-12-02 06:35:52 25 4
gpt4 key购买 nike

我遇到了与此人完全相同的问题:

https://groups.google.com/forum/#!topic/google-appengine-java/4y90M9NlWsA

但没有任何回复,我在互联网上看不到任何其他有帮助的内容。有谁知道为什么会发生这种情况?

    RemoteApiOptions options = new RemoteApiOptions()
.server("localhost", 8888)
.credentials("blah@blah.blah", "");
RemoteApiInstaller installer = new RemoteApiInstaller();
installer.install(options);

堆栈跟踪是:

Exception in thread "main" java.io.IOException: unexpected response from remote api: {rtok: null, app_id: MyCorrectAppId}

at com.google.appengine.tools.remoteapi.RemoteApiInstaller.getAppIdFromServer(RemoteApiInstaller.java:326)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.loginImpl(RemoteApiInstaller.java:278)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.login(RemoteApiInstaller.java:239)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.install(RemoteApiInstaller.java:106)
at uk.blah.blah.MyClass.main(MyClass.java:114)

最佳答案

我注意到您设置了 <application>里面的元素 appengine-web.xmlMyCorrectAppId 。那就是问题所在。正如 Eugene 正确指出的那样,ID 必须全部小写,例如 mycorrectappid 。引用 Dan Sanderson 的书 Programming Google App Engine :

Because the application ID is used in the domain name, an ID can contain only lowercase letters, numbers, or hyphens, and must be shorter than 32 characters. Additionally, Google reserves every Gmail username as an application ID that only the corresponding Gmail user can register.

如果您在 Eclipse 中工作,您需要记住,在设置新的 Web 应用程序项目时(“新建 Web 应用程序项目”对话框底部有一个选项,允许您指定 ID,而不是离开为空)。

enter image description here

对于独立环境,我认为如果将 ID 留空(默认为“no_app_id”),可能就没问题。

希望有帮助!

关于java - IOException : unexpected response from remote api,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19663007/

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