语音生成功能+自定义回复
-
@Mirai2254 连接群#群号 井号是需要带的,芝士一个没卵用的设计
-
此回复已被删除! -
,这个怎么处理
-
@蔚蓝621 py版本需要3.8或3.9,如果安装了uvicorn执行pip uninstall uvicorn
-
@Anstiya 3.9版本了,也没安装
-
-
f=open(r'config.txt') qq=int(f.readline()) bot = Mirai(qq, adapter=WebSocketAdapter( verify_key='****', host='localhost', port=8080 )) aimFriend = 1840094972 aimGroup = 699455559 statusPath = 1 model = 0
是填key+port的对吧,还有config的那个QQ,一共三处
-
@蔚蓝621 是的,然后mirai-api-http的配置按照我那个来。我正在尝试复现这个报错,并重新整理requirements.txt。现在只能确定报错来自yiri-mirai。具体原因我再看看。
-
突然能用了,就是。正在使用语音模型:0......生成中,Successfully saved!结果发了个空白语音
-
Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\mirai\utils.py", line 20, in async_with_exception return await async_(obj) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\mirai\utils.py", line 14, in async_ return (await obj) if inspect.isawaitable(obj) else obj File "G:\PythonPlugins\bot.py", line 97, in handle_group_message tex = '[JA]' + translate((str(event.message_chain))[1:]) + '[JA]' File "G:\PythonPlugins\trans.py", line 42, in translate r = requests.get(youdao_url, params=data).json() # 获取返回的json()内容 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 563, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='openapi.youdao.com', port=443): Max retries exceeded with url: /api?q=%E6%98%8E%E4%BD%A0%E6%98%AF%E6%9C%89%E5%90%8E%E6%89%8B%E7%9A%84&from=zh-CHS&to=ja&appKey=67edf72f6213c548&salt=9c268ccd-e732-44d8-a2bf-9375f84a87c1&sign=6b15ebf4b95efafbfa4bd4ca9ff227154d92a30e62f78da85daea4dac229baa7&signType=v3&curtime=1672281419 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1122)')))
-
@蔚蓝621 有代理的话把代理关掉,或者修改代理规则。需要用到有道翻译api,代理时没法调用。
-
@Anstiya 关了代理还是不行。
-
@蔚蓝621 同样的报错吗,这个是来自requests库的报错,可能是ssl协议版本不对(不知道怎么解决),引发此报错的原因常常是由于开了代理(再检查一下电脑的设置-网络和Internet-代理吧),引发这个报错的其他原因这两天我会再尝试找找,依然无法解决的话需要更改调用的翻译api。
-
大佬,请问运行bot.py 初始化_internal失败,没有引发异常
这样的错误应该怎么解决呀?
而且我运行pip install -r requirements.txt时也会出现
,请问是我文件位置放错了吗? -
@tangqiaoke 你的pip版本较低,要不要先更新一下?
-
@Kallen 大佬,更新到22.3.1版本后还是出现了同样的报错提示
-
@tangqiaoke cmd执行pip install -r requirements.txt需要先进入bot.py所在的目录,你可以
cd /d D:\20221229\plugins\PythonPlugins -
草 杰洛特模型都有
-
@Anstiya 喔!原来是这样!可以用了!谢谢你!@Kallen 也谢谢你提醒我版本该更新啦!
-
当前模型1
正在使用语音模型:1......生成中
Successfully saved!
WARNING:asyncio:Executing <Task pending name='Task-77' coro=<EventBus.emit.<locals>.call() running at C:\Users\xx\AppData\Local\Programs\Python\Python39\lib\site-packages\mirai\bus.py:178> wait_for=<Future
pending cb=[<TaskWakeupMethWrapper object at 0x0000025C5C4D53D0>()] created at C:\Users\xx\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py:424> cb=[gather.<locals>._done_callback() at C:\Users\xx\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py:759] created at C:\Users\xx\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py:820> took 1.407 seconds反到群里的语音,是空的1s语音,大佬这个情况可能是什么原因呀?