我的问题
运行 python3 bot.py 时报错AttributeError: 'ApplicationLaunched' object has no attribute 'app'
控制台完整输出
root@VM-0-12-ubuntu:~/PixivBot/PixivBot-0.2.0# python3 bot.py
2020-10-29 12:30:40.694 | INFO | utils.settings:<module>:38 - Config file was loaded successfully.
2020-10-29 12:30:41.234 | INFO | my_logger:info:7 - initializing app...
Traceback (most recent call last):
File "bot.py", line 89, in <module>
app.launch_blocking()
File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 1076, in launch_blocking
loop.run_until_complete(self.initialize())
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 997, in initialize
self.broadcast.postEvent(ApplicationLaunched(self))
File "/usr/local/lib/python3.8/dist-packages/graia/application/event/lifecycle.py", line 9, in __init__
self.app = app
AttributeError: 'ApplicationLaunched' object has no attribute 'app'
我的思路
我猜想是
File "/usr/local/lib/python3.8/dist-packages/graia/application/event/lifecycle.py", line 9, in __init__
self.app = app
中传入的 ‘app’ 类型不正确,print(app) 看了一下,输出为:
<graia.application.GraiaMiraiApplication object at 0x7f63a0b8b220>
似乎没有问题,有点束手无策
我的问题 运行
python3 bot.py
时报错AttributeError: 'ApplicationLaunched' object has no attribute 'app'
控制台完整输出
我的思路 我猜想是
中传入的 ‘app’ 类型不正确,
print(app)
看了一下,输出为:<graia.application.GraiaMiraiApplication object at 0x7f63a0b8b220>
似乎没有问题,有点束手无策setting.template.json
MiraiApiHttp/setting.yml