Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 来自另一个函数的discord.py方法调用错误_Python_Python 3.x_Discord_Discord.py - Fatal编程技术网

Python 来自另一个函数的discord.py方法调用错误

Python 来自另一个函数的discord.py方法调用错误,python,python-3.x,discord,discord.py,Python,Python 3.x,Discord,Discord.py,我有这个函数async def profile(self,ctx,region,*,caller),我试图用wait self.profile(ctx,region,caller)从另一个函数调用它,它给出了一个错误: > Too many positional arguments for method callpylint Missing mandatory > keyword argument 'summoner' in method callpylint profile函数中

我有这个函数
async def profile(self,ctx,region,*,caller)
,我试图用
wait self.profile(ctx,region,caller)
从另一个函数调用它,它给出了一个错误:

> Too many positional arguments for method callpylint Missing mandatory
> keyword argument 'summoner' in method callpylint
profile函数中的“*”有问题。如何在不删除它的情况下使其工作?

使用裸星(*)强制调用方使用命名参数。有关详细信息,请参阅此处的

按如下方式更新调用:

wait self.profile(ctx,region,caller=caller)

使用裸星(*)强制调用方使用命名参数。有关详细信息,请参阅此处的

按如下方式更新调用:

wait self.profile(ctx,区域,召唤者=召唤者)