一、NoneBot创建遇见问题
创建QQ机器人(nonebot)遇见的错误
1、
错误:
[WARNING] uvicorn | You must pass the application as an import string to enable 'reload' or 'workers'.
可能原因:
env.dev里:fastapi_reload=true---------(不能加)
2、
错误:
[ERROR] uvicorn | [Errno 10013] error while attempting to bind on address ('127.0.0.1', 8080): 以一种访问权限不允许的方式做了一个访问套接字的尝试。
可能原因:
1、端口被占用,要么关掉占用的,要么更改端口
a、关掉:进入cmd--利用netstat -aon|findstr "你的被占用的端口号"查询,记住对应最后一列数字,即PID
再打开任务管理器---详细信息,根据PID找到占用的进程,关掉即可
3、
错误:
[ERROR] uvicorn | [Errno 10048] error while attempting to bind on address ('0.0.0.0', 8080): 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。
原因:
在env.dev里:
host = 0.0.0.0
post = 8080
不能加
4、
错误:
ModuleNotFoundError: No module named 'redis.asyncio'
原因:
1、没开虚拟环境
5、
错误:
FileNotFoundError: [Errno 2] No such file or directory: 'pyproject.toml'
原因:
运行时,没有打开至目标文件夹,如我的是在robot里,则要打开至..../robot
6、
错误:
ModuleNotFoundError: No module named 'nonebot_plugin_gpt3'
原因
pip安装成功了,不知道为什么不行,然后用nb安装这个插件就成功了
7、
错误:
RuntimeError: Plugin already exists: nonebot_plugin_gpt3! Check your plugin name
原因:
1、重复安装了,将代码这导入该模块的语句删掉就行,以及将多于的包删掉,我的是用nb安装后,又复制一个包进来导致重复
8、
错误:
ValueError: NoneBot has not been initialized.
原因:
在这里插入代码片
9、
错误:
[WARNING]: 登录失败: 密码错误或账号被冻结
原因:
10
错误:
Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000000189E6046D0>, 'Connection to api.openai.com timed out. (connect timeout=600)'))
原因:
网不对,需要开梯子
11、
错误:
[WARNING]: Protocol -> device lock is disable. http api may fail.
原因:
12、
错误:
That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists
原因:
响应过于频繁,等会再试就行
13、
错误:
Invalid URL (POST /v1/chat/completions)
14、
错误:
The model: `gpt-4-32k` does not exist
原因:
没有申请chat4的内测
15、
错误:
ValueError: Cloudflare challenge failed
16、
错误:
selenium.common.exceptions.InvalidSessionIdException: Message: invalid session id
17、
错误:
AttributeError: 'str' object has no attribute 'send_message'
原因:
18、
错误:
[FATAL]: 遇到错误: Packet failed to sendPacket: connection closed
19、
错误:[WARNING]: 将在五秒后退出.
登陆成功了,但是5s就退出了
原因:
二、二次元女友
1、
错误:
RuntimeError: The NVIDIA driver on your system is too old (found version 9020).
Please update your GPU driver by downloading and installing a new version from
the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to:
https://pytorch.org to install a PyTorch version that has been compiled with your
version of the CUDA driver.