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

[BUG]: 请求 ChatGPT 服务器时出现问题,请稍后再试 错误信息: AttributeError: 'NoneType' object has no attribute 'new_page' #100

Open
4 tasks done
jfz520 opened this issue Jan 4, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@jfz520
Copy link

jfz520 commented Jan 4, 2023

报告清单

  • 我已仔细阅读并了解上述注意事项。
  • 我已使用最新版本测试过,确认问题依旧存在。
  • 我确定在 GitHub Issues 中没有相同或相似的问题。
  • 我有足够的时间和能力,愿意为此提交 PR 来修复问题。

影响版本

v0.7.3

问题描述

请求 ChatGPT 服务器时出现问题,请稍后再试
错误信息: AttributeError: 'NoneType' object has no attribute 'new_page'

复现步骤

按照教程,我AT机器人问了“1+1”这个问题,然后机器人就回复请求 ChatGPT 服务器时出现问题,请稍后再试
错误信息: AttributeError: 'NoneType' object has no attribute 'new_page'

image

预期行为

No response

实际行为

No response

日志信息

No response

额外补充

No response

@jfz520 jfz520 added the bug Something isn't working label Jan 4, 2023
@PrayerT
Copy link

PrayerT commented Jan 5, 2023

#80 (comment)
一样的问题,先看看那个吧

@jfz520
Copy link
Author

jfz520 commented Jan 5, 2023

好的,已经解决了,但又出现了新问题:token过期

@HAKURELING
Copy link

请问一下怎么解决token过期的问题呢

@Gakki-Loves
Copy link

我也遇到了这个问题,请问您是怎么解决AttributeError: 'NoneType' object has no attribute 'new_page的?

@sword280
Copy link

sword280 commented Jan 18, 2023

请问您是如何解决AttributeError: 'NoneType' object has no attribute 'new_page'
的呢?感谢

@vafyl
Copy link

vafyl commented Jan 29, 2023

同问咋个解决

@Ikaros-521
Copy link

playwright install
#80

@kawaiior
Copy link

kawaiior commented Feb 5, 2023

楼上给出了答案,playwright install,但是如果是缺少GLIBC_2.18同样会报这个错误,建议根据日志来判断具体情况

@vafyl
Copy link

vafyl commented Feb 6, 2023

我确实是缺少部分GLIBC导致的,根据报错日志缺啥,就解决啥就行了。

@Passerby1011
Copy link

Running Matcher(type='message', module=nonebot_plugin_chatgpt.utils) failed.
Traceback (most recent call last):
File "/home/home/chat/bot.py", line 15, in
nonebot.run()
File "/home/home/venv/lib/python3.10/site-packages/nonebot/init.py", line 273, in run
get_driver().run(*args, **kwargs)
File "/home/home/venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 187, in run
uvicorn.run(
File "/home/home/venv/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run
server.run()
File "/home/home/venv/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/home/venv/lib/python3.10/site-packages/nonebot/message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/home/home/venv/lib/python3.10/site-packages/nonebot/message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/home/home/venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 732, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/home/home/venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
await handler(
File "/home/home/venv/lib/python3.10/site-packages/nonebot/dependencies/init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/home/home/venv/lib/python3.10/site-packages/nonebot_plugin_chatgpt/init.py", line 66, in ai_chat
msg = await chat_bot(**session[event]).get_chat_response(text)
File "/home/home/venv/lib/python3.10/site-packages/nonebot_plugin_chatgpt/chatgpt.py", line 123, in get_chat_response
async with self.get_page() as page:
File "/usr/lib/python3.10/contextlib.py", line 199, in aenter
return await anext(self.gen)
File "/home/home/venv/lib/python3.10/site-packages/nonebot_plugin_chatgpt/chatgpt.py", line 115, in get_page
page = await self.content.new_page()
AttributeError: 'NoneType' object has no attribute 'new_page'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants