Skip to content
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

cf challenge fail #57

Closed
Steve0134 opened this issue Dec 23, 2022 · 1 comment
Closed

cf challenge fail #57

Steve0134 opened this issue Dec 23, 2022 · 1 comment

Comments

@Steve0134
Copy link

2022-12-23 23:22:12.497 | INFO | chatbot::17 - 登录 OpenAI 中……
2022-12-23 23:22:12.498 | INFO | chatbot::18 - 请在新打开的浏览器窗口中完成验证
2022-12-23 23:23:01.916 | ERROR | chatbot::36 - cf challenge fail
Traceback (most recent call last):

File "D:\Game\ChatGPT\chatgpt\bot.py", line 19, in
import chatbot

File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed

File "D:\Game\ChatGPT\chatgpt\chatbot.py", line 22, in
bot = AsyncChatbot(config=config.openai.dict(exclude_none=True, by_alias=False), conversation_id=None, base_url=config.openai.base_url)
│ │ │ │ │ │ └ 'https://chat.openai.com/'
│ │ │ │ │ └ OpenAISessionTokenAuth(Authorization=None, proxy=None, base_url='https://chat.openai.com/', cf_clearance=None, user_agent=Non...
│ │ │ │ └ Config(mirai=Mirai(qq=603488136, api_key='1234567890', http_url='http://localhost:8080', ws_url='http://localhost:8080'), ope...
│ │ │ └ <cyfunction BaseModel.dict at 0x000001A3920DF860>
│ │ └ OpenAISessionTokenAuth(Authorization=None, proxy=None, base_url='https://chat.openai.com/', cf_clearance=None, user_agent=Non...
│ └ Config(mirai=Mirai(qq=603488136, api_key='1234567890', http_url='http://localhost:8080', ws_url='http://localhost:8080'), ope...
└ <class 'revChatGPT.revChatGPT.AsyncChatbot'>

File "D:\Game\ChatGPT\chatgpt\python3.9\lib\site-packages\revChatGPT\revChatGPT.py", line 116, in init
self.refresh_session()
│ └ <function AsyncChatbot.refresh_session at 0x000001A3939F1AF0>
└ <revChatGPT.revChatGPT.AsyncChatbot object at 0x000001A393A0C4C0>

File "D:\Game\ChatGPT\chatgpt\python3.9\lib\site-packages\revChatGPT\revChatGPT.py", line 324, in refresh_session
self.refresh_session(running_in_async=running_in_async)
│ │ └ False
│ └ <function AsyncChatbot.refresh_session at 0x000001A3939F1AF0>
└ <revChatGPT.revChatGPT.AsyncChatbot object at 0x000001A393A0C4C0>

File "D:\Game\ChatGPT\chatgpt\python3.9\lib\site-packages\revChatGPT\revChatGPT.py", line 323, in refresh_session
asyncio.run(self.get_cf_cookies())
│ │ │ └ <function AsyncChatbot.get_cf_cookies at 0x000001A3939F1B80>
│ │ └ <revChatGPT.revChatGPT.AsyncChatbot object at 0x000001A393A0C4C0>
│ └ <function run at 0x000001A38F86B4C0>
└ <module 'asyncio' from 'D:\Game\ChatGPT\chatgpt\python3.9\python39.zip\asyncio\init.pyc'>

File "asyncio\runners.py", line 44, in run

File "asyncio\base_events.py", line 647, in run_until_complete

File "D:\Game\ChatGPT\chatgpt\python3.9\lib\site-packages\revChatGPT\revChatGPT.py", line 390, in get_cf_cookies
raise Exception("cf challenge fail")

Exception: cf challenge fail
2022-12-23 23:23:01.944 | ERROR | chatbot::37 - OpenAI 登录失败,可能是 session_token 过期或无法通过 CloudFlare 验证,建议歇息一下再重试。

是用最新版的,网页已经登录进chatgpt了,然后网页就被关掉,重新登陆,两次后报错
半自动、手动登陆都试过,一样结果

@lss233
Copy link
Owner

lss233 commented Dec 30, 2022

请更新到最新版,然后重试。

@lss233 lss233 closed this as completed Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants