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】[ERROR] (robot.py:64)update_access_token获取token失败 RuntimeError: {'code': 100002, 'message': 'internal err'} #225

Open
aJarOfCode opened this issue Aug 2, 2024 · 3 comments

Comments

@aJarOfCode
Copy link

我反复检查了好几遍,我的AppID和secret完全正确
完整报错信息:
RuntimeError: {'code': 100002, 'message': 'internal err'}

我查看了robot.py,似乎每次请求都会向https://bots.qq.com/app/getAppAccessToken 获取access_token,如果请求超时,捕获asyncio.TimeoutError异常,并打印超时信息。如果响应数据中没有access_token或expires_in字段,打印错误信息并抛出RuntimeError异常。显然我遇到了第二种情况。当成功之后才会返回机器人的token。我目前还没找出解决办法。

@aJarOfCode aJarOfCode changed the title [ERROR] (robot.py:64)update_access_token获取token失败 RuntimeError: {'code': 100002, 'message': 'internal err'} 【疑似BUG】[ERROR] (robot.py:64)update_access_token获取token失败 RuntimeError: {'code': 100002, 'message': 'internal err'} Aug 2, 2024
@Chi-Re
Copy link

Chi-Re commented Aug 16, 2024

这个离谱的问题有个很离谱的原因:

async def start(self, appid: str, secret: str, ret_coro: bool = False)

也就是,app_id必须是str

给appid加个双引号就行了

@yxjsxl
Copy link

yxjsxl commented Dec 22, 2024

这个离谱的问题有个很离谱的原因:

async def start(self, appid: str, secret: str, ret_coro: bool = False)

也就是,app_id必须是str

给appid加个双引号就行了

试过,不行

@yxjsxl
Copy link

yxjsxl commented Dec 28, 2024

解决方法
python:需要使用json库的dumps导出一下json到字符串,然后传入data参数

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

3 participants