<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hello everybody,</div>
<div>since this is my first attempt to use python.net I run into a problem. Maybe someone on this list can help or point me into the right direction to solve this issue.</div>
<div>I use a .net assembly in my software which I got from a supplier. While I can successfully load and import the assembly and its classes I get errors when I try to call a function.</div>
<div>The python version is 2.7.3 with the latest python.net clr 4.0.</div>
<div> </div>
<div>###########################################</div>
<div>Here is my code:</div>
<div>import clr<br/>
dll_path = os.path.join(os.getcwd(),"Data","TPS")<br/>
if dll_path not in sys.path: sys.path.append(dll_path)<br/>
clr.AddReference("isc.Eng.TpsImp")<br/>
from isc.Eng.TpsImp import TpsImpEngine<br/>
from System import String<br/>
tps_securitykey = "..."<br/>
result = TpsImpEngine.ServiceStart(String(dll_path), String(tps_securitykey), TpsImpEngine.COILTYP.HeatingWater)</div>
<div><br/>
The last command throws an TypeError:<br/>
result = TpsImpEngine.ServiceStart(String(dll_path), String(tps_securitykey), TpsImpEngine.COILTYP.HeatingWater)<br/>
TypeError: No method matches given arguments</div>
<div> </div>
<div>###########################################</div>
<div>I tried to get more information on "TpsImpEngine" and "ServiceStart".<br/>
print TpsImpEngine.ServiceStart.__doc__<br/>
Int32 ServiceStart(System.String, System.String, COILTYP)</div>
<div> </div>
<div>##########################################</div>
<div>help(TpsImpEngine)<br/>
Help on class TpsImpEngine in module isc.Eng.TpsImp:</div>
<div>class TpsImpEngine(System.Object)<br/>
| Void .ctor()<br/>
| <br/>
| Method resolution order:<br/>
| TpsImpEngine<br/>
| System.Object<br/>
| __builtin__.object<br/>
| <br/>
.<br/>
.<br/>
.<br/>
| <br/>
| Overloads<br/>
| <br/>
| ServiceEnd<br/>
| Void ServiceEnd()<br/>
| <br/>
| ServiceStart<br/>
| Int32 ServiceStart(System.String, System.String, COILTYP)<br/>
| <br/>
| SystemMessage<br/>
| <br/>
| Timeout<br/>
| <br/>
.<br/>
.<br/>
.<br/>
| <br/>
| ----------------------------------------------------------------------<br/>
| Data and other attributes defined here:<br/>
| <br/>
| COILTYP = <class 'isc.Eng.TpsImp.COILTYP'><br/>
| <br/>
| <br/>
| __new__ = <built-in method __new__ of CLR Metatype object><br/>
| T.__new__(S, ...) -> a new object with type S, a subtype of T<br/>
| <br/>
| ----------------------------------------------------------------------<br/>
</div>
<div>Strange thing is that if I try to call a function which takes no arguments (e.g. ServiceEnd()) I get the same error. If anybody has an idea on what is going wrong please let me know.</div>
<div>Thank you.<br/>
Ingo</div>
<div> </div>
</div></div></body></html>