nonebot / aiocqhttp

A Python SDK with async I/O for CQHTTP (OneBot).
https://aiocqhttp.nonebot.dev
MIT License
280 stars 39 forks source link

新版Quart兼容性问题 #68

Closed U2FsdGVkX1 closed 1 year ago

U2FsdGVkX1 commented 1 year ago
Traceback (most recent call last):
  File "C:\Users\U2Fsd\Desktop\jd\main.py", line 116, in <module>
    loop.create_task(bot.run_task(host='127.0.0.1', port=8080))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\U2Fsd\scoop\apps\python\current\Lib\site-packages\aiocqhttp\__init__.py", line 231, in run_task
    return self._server_app.run_task(host=host, port=port, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Quart.run_task() got an unexpected keyword argument 'use_reloader'

代码:

import asyncio
from aiocqhttp import CQHttp, Event

bot = CQHttp()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.create_task(bot.run_task(host='127.0.0.1', port=8080))
loop.run_forever()
cleoold commented 1 year ago

This is a prolonged bug.

Right now please resort to using bot.run()

You are welcomed to submit a pr to remove it in run_task() implementation.

On Sun., Mar. 19, 2023, 07:47 U2FsdGVkX1, @.***> wrote:

Traceback (most recent call last): File "C:\Users\U2Fsd\Desktop\jd\main.py", line 116, in loop.create_task(bot.run_task(host='127.0.0.1', port=8080)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\U2Fsd\scoop\apps\python\current\Lib\site-packages\aiocqhttp__init__.py", line 231, in run_task return self._server_app.run_task(host=host, port=port, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Quart.run_task() got an unexpected keyword argument 'use_reloader'

代码:

import asyncio from aiocqhttp import CQHttp, Event

bot = CQHttp() loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop.create_task(bot.run_task(host='127.0.0.1', port=8080)) loop.run_forever()

— Reply to this email directly, view it on GitHub https://github.com/nonebot/aiocqhttp/issues/68, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGVB7JZX54HOY6UUXZEMTW43W6XANCNFSM6AAAAAAWACAFBU . You are receiving this because you are subscribed to this thread.Message ID: @.***>