智能助手网
标签聚合 遇到

/tag/遇到

linux.do · 2026-04-18 21:09:24+08:00 · tech

new_api_panic: Panic detected, error: runtime error: invalid memory address or nil pointer dereference. Please submit a issue here: GitHub - QuantumNous/new-api: A unified AI model hub for aggregation & distribution. It supports cross-converting various LLMs into OpenAI-compatible, Claude-compatible, or Gemini-compatible formats. A centralized gateway for personal and enterprise model management. 🍥 · GitHub | Upstream: {“error”:{“message”:“Panic detected, error: runtime error: invalid memory address or nil pointer dereference. Please submit a issue here: https://github.com/Calcium-Ion/new-api",“type”:"new_api_panic ”}} 2 个帖子 - 2 位参与者 阅读完整话题

linux.do · 2026-04-18 12:15:23+08:00 · tech

render部署的cpa遇到Access blocked by Cloudflare. This usually happens when connecting from a restricted region (status 403 Forbidden), u rl: https://www.xxxx.top/v1/responses , cf-ray: 9ee0d216d8856e64-HKG 现在在本机使用codex会报错,尝试过切换网络、切换节点依然报错,直接访问网页是正常的。然而换了机器后是可以正常连接的。怀疑是被render的cf通过tls指纹给ban了。有佬友遇到过知道怎么解决吗? 1 个帖子 - 1 位参与者 阅读完整话题

linux.do · 2026-04-18 00:18:46+08:00 · tech

前几天晚上和朋友聊天聊到谈恋爱这个话题 我们都觉得遇到能结婚的对象太难了 其实偶尔也会想起前任 和前任是在某书认识的 那会儿还在读大二 爬虫作业不会写在那发求助哈哈哈哈 然后就加了微信他帮我看看 最后也没看出个啥 结果聊出了感情 他算是懂我的人 三观一致 但是因为一些家庭原因和他个人原因吧不能走到最后 但算是一段体面的结束了 很好奇大家是怎么谈上恋爱的哈哈哈哈 20 个帖子 - 17 位参与者 阅读完整话题

linux.do · 2026-04-17 23:39:21+08:00 · tech

在此记录一个在开发自测环节中遇到的问题: 先上代码(已脱敏) type TestData struct { Data []byte `json:"data"` } func TestTryEncryptoClient(t *testing.T) { jsonStr := "{\"Data\":\"4GFwsR9XFRkyb/9Hn14zNpQRFE4V/f1hLIDlnff6LLPR/EvRmSW6ma6PHZiamB4mDeynjRYfVsfipg==\"}" message := &TestData{} err := json.Unmarshal([]byte(jsonStr), message) if err != nil { panic(err) } result := message.Data t.Logf("%v", result) t.Log(string(result)) sprintf := fmt.Sprintf("%s", result) t.Log(sprintf) t.Logf("bad base64: %s", result) t.Log("test done") } 输出内容(goland)控制台 [224 97 112 177 31 87 21 25 50 111 255 71 159 94 51 54 148 17 20 78 21 253 253 97 44 128 229 157 247 250 44 179 209 252 75 209 153 37 186 153 174 143 29 152 154 152 30 38 13 236 167 141 22 31 86 199 226 166] 짍V��� 짍V��� 짍V��� xxx_test.go:193: test done 现象描述: 此段代码会造成如下代码片段未能输出 t.Logf("bad base64: %s", result) ,并且如果是多协程测试条件下,很可能会造成控制台卡住(无法输出后续内容) 原因分析: 在此过程中,我们错误使用了%s来匹配 []byte 类型的数据,虽然golang在编译或者goland在运行前检查中不会报错/warning,但是在最终输出的时候,由于 byte[] 中包含了不能被控制台解析的控制字符,所以会造成最终输出内容的错误(也可以叫做编码不匹配),并且由于大部分编码都会兼容ASCII编码,在上述输出中会有byte为22的控制字符-> ASCII中描述为暂停等待同步字符,所以在多线程/协程测试中会导致控制台卡住等待同步完成 解决方案: 使用string现式包裹 []byte 即可 sprintf := fmt.Sprintf("%s", string(result)) 总结: 下次当遇到控制台卡住无输出的时候,记得检查是不是%s遇上了 []byte 类型的数据(常见某些加密流中的测试,用于观察加密后的字符输出) 1 个帖子 - 1 位参与者 阅读完整话题