File "D:\qqrobotv4\sagiri-bot\main.py", line 56, in
saya.require(f"sagiri_bot.handler.handlers.{module.split('.')[0]}")
│ └ <function Saya.require at 0x000002685C21FCA0>
└ <graia.saya.Saya object at 0x000002685E0E5400>
File "D:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\graia\saya__init__.py", line 120, in require
channel = self.require_resolve(module)
│ │ └ 'sagiri_bot.handler.handlers.speak'
│ └ <function Saya.require_resolve at 0x000002685C21FB80>
└ <graia.saya.Saya object at 0x000002685E0E5400>
File "D:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\graia\saya__init.py", line 76, in require_resolve
imported_module = importlib.import_module(module, module)
│ │ │ └ 'sagiri_bot.handler.handlers.speak'
│ │ └ 'sagiri_bot.handler.handlers.speak'
│ └ <function import_module at 0x0000026859AF4A60>
└ <module 'importlib' from 'D:\Program Files (x86)\anaconda\envs\sagiri\lib\importlib\init__.py'>
File "", line 1030, in _gcd_import
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:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\tencentcloud\common\credential.py", line 48, in init
if secret_id is None or secret_id.strip() == "":
│ └ 1112040148
└ 1112040148
AttributeError: 'int' object has no attribute 'strip'
问题
bot无法正常启动
如何复现
输入
python main.py
预期行为
正常启动bot
使用环境
日志/截图
2022-10-07 20:37:24.485 | ERROR | graia.ariadne.util:loguru_exc_callback:101 - Exception: Traceback (most recent call last):
File "D:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\graia\saya__init__.py", line 120, in require channel = self.require_resolve(module) │ │ └ 'sagiri_bot.handler.handlers.speak' │ └ <function Saya.require_resolve at 0x000002685C21FB80> └ <graia.saya.Saya object at 0x000002685E0E5400>
File "D:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\graia\saya__init.py", line 76, in require_resolve imported_module = importlib.import_module(module, module) │ │ │ └ 'sagiri_bot.handler.handlers.speak' │ │ └ 'sagiri_bot.handler.handlers.speak' │ └ <function import_module at 0x0000026859AF4A60> └ <module 'importlib' from 'D:\Program Files (x86)\anaconda\envs\sagiri\lib\importlib\init__.py'>
File "D:\Program Files (x86)\anaconda\envs\sagiri\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) │ │ │ │ │ └ 0 │ │ │ │ └ 'sagiri_bot.handler.handlers.speak' │ │ │ └ 0 │ │ └ 'sagiri_bot.handler.handlers.speak' │ └ <function _gcd_import at 0x0000026859941310> └ <module 'importlib._bootstrap' (frozen)>
File "", line 1030, in _gcd_import
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:\qqrobotv4\sagiri-bot\sagiri_bot\handler\handlers\speak__init__.py", line 55, in
cred = credential.Credential(user_data["secret_id"], user_data["secret_key"])
│ │ │ └ {'secret_id': 1112040148, 'secret_key': 'NHl0Xoa17B9AnqqF'}
│ │ └ {'secret_id': 1112040148, 'secret_key': 'NHl0Xoa17B9AnqqF'}
│ └ <class 'tencentcloud.common.credential.Credential'>
└ <module 'tencentcloud.common.credential' from 'D:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\tencentcl...
File "D:\Program Files (x86)\anaconda\envs\sagiri\lib\site-packages\tencentcloud\common\credential.py", line 48, in init if secret_id is None or secret_id.strip() == "": │ └ 1112040148 └ 1112040148
AttributeError: 'int' object has no attribute 'strip'