Skip to content

calling C# method that have Params argument , throwing TypeError when not using that argument #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tbeidas opened this issue Aug 20, 2019 · 0 comments

Comments

@tbeidas
Copy link

tbeidas commented Aug 20, 2019

Environment

  • Pythonnet version: 2.4.0
  • Python version: 3.6.8
  • Operating System: Windows Server 2016

Details

After upgrade from Pythonnet 2.2.2 to 2.4.0, I get the following error:

No method matches given arguments for GetConfigInterface

C# method:

public static IConfig GetConfigInterface (ConfigType type , params string [] param)    

What commands did you run to trigger this issue?

GetConfigInterface(self.pdcuConfigType) 

This worked without any issue using pythonnet 2.2.2 while it fails at version 2.4.0.

It seems to be related to the reported issue #916, but it's a different use case.

@slide slide mentioned this issue Apr 8, 2020
4 tasks
@filmor filmor closed this as completed in 49a230b May 16, 2020
AlexCatarino pushed a commit to QuantConnect/pythonnet that referenced this issue Jun 29, 2020
Add a check to see if the last parameter is a params parameter. Set the correct flag to show that it is a paramsArray function.

Fixes pythonnet#943 and pythonnet#331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant