Task exception was never retrieved
future: <Task finished coro=<on_player_stop() done, defined at /home/pi/Desktop/EbayBot/musicbot/bot.py:413> exception=TypeError('change_presence() takes 1 positional argument but 2 were given',)>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(value)
File "/home/pi/Desktop/EbayBot/musicbot/bot.py", line 414, in on_player_stop
await self.update_now_playing()
File "/home/pi/Desktop/EbayBot/musicbot/bot.py", line 467, in update_now_playing
await self.change_presence(game)
TypeError: change_presence() takes 1 positional argument but 2 were given
我的代码是:
^{pr2}$
正如错误消息所说,
change_presence
不接受任何位置参数(除了self
)。所有其他参数必须作为关键字参数传递。在见the docs。(注意函数签名中的星号。)
相关问题 更多 >
编程相关推荐