Poppy-xiao / satori_to_onebot

MIT License
18 stars 1 forks source link

启动报错Queue.__init__() got an unexpected keyword argument 'loop' #1

Closed SlightDust closed 1 year ago

SlightDust commented 1 year ago

环境是Win10 + Python 3.11.4

PS D:\chronocat_to_HoshinoBot> python .\run.py
Traceback (most recent call last):
  File "D:\chronocat_to_HoshinoBot\run.py", line 7, in <module>
    server = WebSocketServer()
             ^^^^^^^^^^^^^^^^^
  File "D:\chronocat_to_HoshinoBot\src\websocket.py", line 14, in __init__
    self.queue_satori = asyncio.Queue(loop=self.loop)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Queue.__init__() got an unexpected keyword argument 'loop'
SlightDust commented 1 year ago

我换个低一点的python版本试试

SlightDust commented 1 year ago

用python3.9.10没这个问题了

Poppy-xiao commented 1 year ago

用python3.9.10没这个问题了

我看了一眼这里可以删掉里面的self.loop,更高版本就不会有问题了,代码已更新。