-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] AttributeError: 'NoneType' object has no attribute 'group' #1081
Comments
部署到国外服务器出现同样问题NoneType 但是我发现这个raise RuntimeError(f"Failed to download {url} too many times.") reverse_ws_port = 8554 [poe] |
我也遇到了这个问题。我是在本地笔记本上部署的,另外你似乎泄露了 Poe Token。 |
看了一下是上游 poe-api 的问题,他们也讨论了这件事:ading2210/poe-api#202 我看了一眼依赖里面的 poe-api 版本是 0.4.11: chatgpt-mirai-qq-bot/requirements.txt Line 33 in 176a766
|
OK,我知道是什么情况了,我在本地 build 了一个 docker,发现确实是依赖没有更新到最新版导致的。在更新到最新的 poe-api 时会安装 quick-js,它在 build 时会调用 gcc,因此除了更新依赖外,还需要在 Dockerfile 中添加一条 build-essential 的指令。 |
提交 issue 前,请先确认:
表现
AttributeError: 'NoneType' object has no attribute 'group'
运行环境:
复现步骤
描述你是如何触发这个 BUG 的
1.我一开始是全流程都成功过的,并且能够在qq里正常对话和语音输出
2.但后来我就在另一个环境py3.10中安装了edge-tts,按道理是不会对本项目环境造成任何影响的
3.现在我经过重新安装本项目,甚至更换一台电脑后仍是以下问题。
4.我的配置文件也已经经过详细修改,但没有作用。
预期行为
应该完美运行。
日志
Active code page: 65001
2023-07-23 22:22:55.788 | SUCCESS | config:scan_presets:557 - 检查预设:聊天 <==> presets/issue402.txt [成功]
2023-07-23 22:22:55.788 | SUCCESS | config:scan_presets:557 - 检查预设:猫娘 <==> presets/catgirl.txt [成功]
2023-07-23 22:22:55.788 | SUCCESS | config:scan_presets:570 - 注册预设:bing <==> ./presets\assistant\bing.txt [成功]
2023-07-23 22:22:55.788 | SUCCESS | config:scan_presets:570 - 注册预设:dan <==> ./presets\assistant\dan.txt [成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:debater <==> ./presets\assistant\debater.txt [ 成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:kp <==> ./presets\assistant\kp.txt [成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:lawyer <==> ./presets\assistant\lawyer.txt [成 功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:long <==> ./presets\assistant\long.txt [成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:Lss233 <==> ./presets\assistant\Lss233.txt [成 功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:novelist <==> ./presets\assistant\novelist.txt [成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:poet <==> ./presets\assistant\poet.txt [成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:shineisheji <==> ./presets\assistant\shineisheji.txt [成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:catgirl <==> ./presets\role-play\catgirl.txt [ 成功]
2023-07-23 22:22:55.798 | SUCCESS | config:scan_presets:570 - 注册预设:cixiaogui <==> ./presets\role-play\cixiaogui.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:crazy <==> ./presets\role-play\crazy.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:debatestick <==> ./presets\role-play\debatestick.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:dingzhen <==> ./presets\role-play\dingzhen.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:DJ <==> ./presets\role-play\DJ.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:ERNIE <==> ./presets\role-play\ERNIE.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:gaoqiqiang <==> ./presets\role-play\gaoqiqiang.txt [成功]
2023-07-23 22:22:55.808 | SUCCESS | config:scan_presets:570 - 注册预设:hanli <==> ./presets\role-play\hanli.txt [成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:huxijin <==> ./presets\role-play\huxijin.txt [ 成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:ikun <==> ./presets\role-play\ikun.txt [成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:jiabaili <==> ./presets\role-play\jiabaili.txt [成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:linruolan <==> ./presets\role-play\linruolan.txt [成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:MOSS <==> ./presets\role-play\MOSS.txt [成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:PG13succubus <==> ./presets\role-play\PG13succubus.txt [成功]
2023-07-23 22:22:55.818 | SUCCESS | config:scan_presets:570 - 注册预设:powanlang <==> ./presets\role-play\powanlang.txt [成功]
2023-07-23 22:22:55.828 | SUCCESS | config:scan_presets:570 - 注册预设:TsundereCatgirl <==> ./presets\role-play\TsundereCatgirl.txt [成功]
2023-07-23 22:22:55.828 | SUCCESS | config:scan_presets:570 - 注册预设:welldone <==> ./presets\role-play\welldone.txt [成功]
2023-07-23 22:22:55.828 | SUCCESS | config:scan_presets:570 - 注册预设:yutao <==> ./presets\role-play\yutao.txt [成功]
2023-07-23 22:22:55.838 | SUCCESS | config:scan_presets:570 - 注册预设:zhangweiwei <==> ./presets\role-play\zhangweiwei.txt [成功]
2023-07-23 22:22:55.838 | ERROR | config:scan_presets:567 - 注册预设:dan <==> ./presets\utils\dan.txt [失败:关键词 已存在]
2023-07-23 22:22:55.838 | ERROR | config:scan_presets:567 - 注册预设:catgirl <==> ./presets\catgirl.txt [失败:关键 词已存在]
2023-07-23 22:22:55.838 | SUCCESS | config:scan_presets:570 - 注册预设:catgirl_en <==> ./presets\catgirl_en.txt [成功]
2023-07-23 22:22:55.838 | SUCCESS | config:scan_presets:570 - 注册预设:issue402 <==> ./presets\issue402.txt [成功]
2023-07-23 22:22:55.838 | SUCCESS | config:scan_presets:570 - 注册预设:预设模板 <==> ./presets\预设模板.txt [成功]
2023-07-23 22:22:55.928 | INFO | manager.bot:login_poe:274 - 正在解析第 1 个 poe web 账号
2023-07-23 22:22:55.928 | INFO | manager.bot:__check_proxy:393 - [代理测试] 正在检查代理配置:http://127.0.0.1:10809
2023-07-23 22:23:00.237 | SUCCESS | manager.bot:__check_proxy:401 - [代理测试] 连接成功!
2023-07-23 22:23:03.762 | ERROR | manager.bot:login_poe:282 - 解析失败:
2023-07-23 22:23:03.764 | ERROR | manager.bot:login_poe:283 - 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\chatgpt\bot.py", line 17, in
loop.run_until_complete(botManager.login())
│ │ │ └ <function BotManager.login at 0x0000012348641D00>
│ │ └ <manager.bot.BotManager object at 0x000001234846B210>
│ └ <function BaseEventLoop.run_until_complete at 0x0000012321039440>
└
File "asyncio\base_events.py", line 640, in run_until_complete
sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever
sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run
self._loop = loop
│ └ <member '_loop' of 'Handle' objects>
└ <Handle <TaskStepMethWrapper object at 0x0000012348741270>()>
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\chatgpt\manager\bot.py", line 109, in login
self.login_poe()
│ └ <function BotManager.login_poe at 0x0000012348642840>
└ <manager.bot.BotManager object at 0x000001234846B210>
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\python3.11\Lib\site-packages\poe.py", line 152, in init
self.connect_ws()
│ └ <function Client.connect_ws at 0x0000012322F5CCC0>
└ <poe.Client object at 0x00000123497D40D0>
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\python3.11\Lib\site-packages\poe.py", line 405, in connect_ws
self.setup_connection()
│ └ <function Client.setup_connection at 0x0000012322F5C360>
└ <poe.Client object at 0x00000123497D40D0>
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\python3.11\Lib\site-packages\poe.py", line 178, in setup_connection
self.next_data = self.get_next_data(overwrite_vars=True)
│ │ └ <function Client.get_next_data at 0x0000012322F5C540>
│ └ <poe.Client object at 0x00000123497D40D0>
└ <poe.Client object at 0x00000123497D40D0>
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\python3.11\Lib\site-packages\poe.py", line 226, in get_next_data
self.formkey = self.extract_formkey(r.text)
│ │ │ │ └ '<title>Assistant - Poe</title><meta name="descripti...
│ │ │ └ <Response [200]>
│ │ └ <function Client.extract_formkey at 0x0000012322F5C4A0>
│ └ <poe.Client object at 0x00000123497D40D0>
└ <poe.Client object at 0x00000123497D40D0>
File "E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\python3.11\Lib\site-packages\poe.py", line 203, in extract_formkey
script_text = re.search(script_regex, html).group(1)
│ │ │ └ '<title>Assistant - Poe</title><meta name="descripti...
│ │ └ '<script>(.+)function\(\){return .\.join\(""\)};</script>'
│ └ <function search at 0x000001231ED22D40>
└ <module 're' from 'E:\Browser_download_file\Windows-quickstart-refs.tags.v2.5.2\python3.11\python311.zip\re\init.pyc'>
AttributeError: 'NoneType' object has no attribute 'group'
2023-07-23 22:23:03.800 | ERROR | manager.bot:login_poe:285 - 所有 Poe 账号均解析失败!
2023-07-23 22:23:03.800 | SUCCESS | manager.bot:login_poe:286 - 成功解析 0/1 个 poe web 账号!
2023-07-23 22:23:03.801 | ERROR | manager.bot:login:155 - 没有登录成功的账号,程序无法启动!
The text was updated successfully, but these errors were encountered: