admin管理员组

文章数量:1516870

问题:

mac电脑安装了nanobot,打开飞书配置后执行nanobot gateway 报错

[Lark] [2026-02-20 15:34:25,161] [ERROR] connect failed, err: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1081)

python版本是3.14

原因:

Python 没有安装系统 CA 证书

解决方法:

运行下面这个脚本

open "/Applications/Python 3.14/Install Certificates.command"

或直接执行

/Applications/Python\ 3.14/Install\ Certificates.command

执行过程会看到类似:

Installing certifi...
Updating certificates...

这个脚本做的事情是:

  • 安装 certifi

  • 把系统信任链链接到 Python

测试:

运行

python3 -c "import urllib.request; print(urllib.request.urlopen(').status)"

如果输出200,说明已经正常

我的错误提示

[16:25:52] yimiyisua:nanobot git:(main*) $ python3 -c "import ssl, urllib.request; print(urllib.request.urlopen(').status)" Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 1321, in do_open h.request(req.get_method(), req.selector, req.data, headers, ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ encode_chunked=req.has_header('Transfer-encoding')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/http/client.py", line 1358, in request self._send_request(method, url, body, headers, encode_chunked) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

本文标签: 系统这个脚本用户困惑