Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问为什么getApiKey()是null #57

Open
pluto-han opened this issue Apr 26, 2023 · 15 comments
Open

请问为什么getApiKey()是null #57

pluto-han opened this issue Apr 26, 2023 · 15 comments
Labels
help wanted Extra attention is needed

Comments

@pluto-han
Copy link

终端提示:Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "com.ashin.config.ChatgptConfig.getApiKey()" is null
不知道为什么会这样,是因为key被封了吗
不知道该如何解决QAQ

@ashinnotfound
Copy link
Owner

应该是配置文件没写对,导致读取不到

@pluto-han
Copy link
Author

pluto-han commented Apr 26, 2023 via email

@ashinnotfound
Copy link
Owner

你确定发送完整了吗,我并没有看到(记得将关键信息打码)
image

Repository owner deleted a comment from pluto-han Apr 26, 2023
@ashinnotfound
Copy link
Owner

方便截图吗 刚刚你cv过来的有些转义 (记得apikey也打码,我把刚才你的回复删了,防止你的apikey泄露)

@pluto-han
Copy link
Author

application
感谢。下面是截图(不知道能否正常显示)

@ashinnotfound
Copy link
Owner

你是在什么环境下运行的呢

@pluto-han
Copy link
Author

pluto-han commented Apr 26, 2023 via email

@ashinnotfound
Copy link
Owner

jar包运行还是ide里

@pluto-han
Copy link
Author

pluto-han commented Apr 26, 2023 via email

@ashinnotfound
Copy link
Owner

貌似你的配置没问题,更像是jar包没有读取到application.yml文件

@ashinnotfound
Copy link
Owner

你的配置文件名是application.yml吗,我看你截图似乎没有后缀.yml

@pluto-han
Copy link
Author

pluto-han commented Apr 26, 2023 via email

@ashinnotfound
Copy link
Owner

是yml后缀,我没有设置'显示拓展名'。我怀疑就是我的api有问题,我给其他gpt项目使用我的key,也出现了问题   1514142997 @.***  

------------------ 原始邮件 ------------------ 发件人: "xun @.>; 发送时间: 2023年4月26日(星期三) 下午5:15 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ashinnotfound/ChatGPT-YourChatRobot] 请问为什么getApiKey()是null (Issue #57) 你的配置文件名是application.yml吗,我看你截图似乎没有后缀.yml — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jar包和application.yml在同级目录下吗,我刚才尝试把它删除后缀.yml或者把application.yml放于不同级目录,出现了和你一样的报错。应该不是api的问题,因为它就没读取到apikey,而且如果是apikey的问题,报错也不会是这个

@pluto-han
Copy link
Author

Snipaste_2023-04-26_17-47-21
我的是这样子的,需要做什么更改吗

@ashinnotfound
Copy link
Owner

Snipaste_2023-04-26_17-47-21
我的是这样子的,需要做什么更改吗

这我也不知道为什么了😐

@ashinnotfound ashinnotfound added the help wanted Extra attention is needed label May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants