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

一直报错panic: runtime error: invalid memory address or nil pointer dereference #278

Closed
imhut opened this issue Jul 19, 2023 · 5 comments · Fixed by #280
Closed

一直报错panic: runtime error: invalid memory address or nil pointer dereference #278

imhut opened this issue Jul 19, 2023 · 5 comments · Fixed by #280
Labels
question Further information is requested

Comments

@imhut
Copy link

imhut commented Jul 19, 2023

问题反馈

`nohup: ignoring input
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x774eef]

goroutine 1 [running]:
github.com/charmbracelet/log.(*Logger).log(0x8?, 0x961fd60?, {0xe62f20?, 0xc0057f8b88?}, {0x0?, 0xe85cc0?, 0xc00961fd01?})
/go/pkg/mod/github.com/charmbracelet/log@v0.2.1/logger.go:52 +0x4f
github.com/charmbracelet/log.(*Logger).Fatal(0xc009718f00?, {0xe62f20?, 0xc0057f8b88?}, {0x0?, 0x203000?, 0xc000003860?})
/go/pkg/mod/github.com/charmbracelet/log@v0.2.1/logger.go:318 +0x3c
github.com/eryajf/chatgpt-dingtalk/pkg/logger.Fatal(...)
/github/workspace/pkg/logger/logger.go:41
github.com/eryajf/chatgpt-dingtalk/config.LoadConfig()
/github/workspace/config/config.go:264 +0x276
github.com/eryajf/chatgpt-dingtalk/public.InitSvc()
/github/workspace/public/public.go:20 +0x1d
main.init.0()
/github/workspace/main.go:23 +0x19`

实在是不知道那里问题了,直接用的config.yml
就配置了:
run_mode: "stream"
api_key:“
base_url:“

app_secrets:[***********]
credentials:
下面参数

大佬们,帮忙看看。。。。

@imhut imhut added the question Further information is requested label Jul 19, 2023
@imhut
Copy link
Author

imhut commented Jul 19, 2023

docker和二进制部署 都是同样的错误

@barlowliu
Copy link

我也遇到同样的问题,大家有解决方案吗?

@imhut
Copy link
Author

imhut commented Jul 23, 2023

我也遇到同样的问题,大家有解决方案吗?

我换其他的程序了,一切正常。。。

@imhut
Copy link
Author

imhut commented Jul 25, 2023

昨天根据排除,发现是service_url为空造成的,不是说 理论上你可以忽略该配置项,如果run_mode为stream模式,则可以忽略该配置项。。。
填写了,就不报错了,但是图片在钉钉上会不显示,根据日志,得到的URL 到的答案: ">点击图片可旋转或放大。\n" 也是一样打不开的,另外一个项目貌似直接用的第三方URL给钉钉推送的,目前就暂时这个问题。

@imhut
Copy link
Author

imhut commented Jul 25, 2023

/images/20230724-170250.png 上面把URL过滤掉了,前缀是service_url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants