Adrian Perez
2011-05-17 01:29:36 UTC
Hello everyone,
This is probably a total n00b question, but I've been using pythonnet in our toolchain to communicate with a private c# assembly for months now without ever running into a problem I couldn't eventually figure out. This one has me totally stumped, and I'm hoping something obvious will jump out at experienced eyes.
(I did a find/replace for secrecy, besides silly names these are the raw results I get back)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Byte[], Int32 ByRef)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, System.Collections.Generic.IEnumerable`1[System.Byte], Int32 ByRef)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Int32, System.Collections.Generic.IEnumerable`1[System.Byte], Int32 ByRef)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Int32, Byte[], Int32 ByRef)
File "<string>", line 1, in <fragment>
TypeError: No method matches given arguments
Does anyone see the obvious thing I'm doing wrong? Disambiguating can be a pain but I've done it before for other methods and have never had such an impossible time getting the correct method called.
Thanks,
Adrian Perez
_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
This is probably a total n00b question, but I've been using pythonnet in our toolchain to communicate with a private c# assembly for months now without ever running into a problem I couldn't eventually figure out. This one has me totally stumped, and I'm hoping something obvious will jump out at experienced eyes.
(I did a find/replace for secrecy, besides silly names these are the raw results I get back)
accessor= MyCompany.SomeNamespace.SomeTypeArrayAccessor
accessor.WriteByte.__overloads__
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Byte[])accessor.WriteByte.__overloads__
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Byte[], Int32 ByRef)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, System.Collections.Generic.IEnumerable`1[System.Byte], Int32 ByRef)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Int32, System.Collections.Generic.IEnumerable`1[System.Byte], Int32 ByRef)
Boolean WriteByte(MyCompany.SomeNamespace.SomeType, Int32, Byte[], Int32 ByRef)
desired_method= accessor.WriteByte.__overloads__[MyCompany.SomeNamespace.SomeType, System.Array[System.Byte]]
arg_a= ...
arg_b= ...
type(arg_a)
<class 'MyCompany.SomeNamespace.SomeType'>arg_a= ...
arg_b= ...
type(arg_a)
type(arg_b)
<class 'System.Byte[]'>result= desired_method(arg_a, arg_b)
Traceback (most recent call last):File "<string>", line 1, in <fragment>
TypeError: No method matches given arguments
Does anyone see the obvious thing I'm doing wrong? Disambiguating can be a pain but I've done it before for other methods and have never had such an impossible time getting the correct method called.
Thanks,
Adrian Perez
_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet