[IronPython] Uninformative Type Error

Bakalar, Matthew (NIH/CIT) [C] bakalarmh at mail.nih.gov
Tue Jun 1 16:15:09 CEST 2010

Hello All,
I am running into a frustrating exception. When attempting to instantiate a class with an argument that is an instance of a different class from a separate assembly, I receive an unhelpful type error from the IronPython interpreter:
TypeError: expected XYZPositioner, got XYZPositioner
Both assemblies were loaded using clr.AddReferenceToFileAndPath. I have tried to confirm the type of the object I am passing as an argument to the constructor:
> A.GetType() == Target.Devices.XYZPositioner
Is there any way to get more information about the error? (The message reminds me of my days working in OCaml, where all of the error messages were translated from French grammar and it was never clear how to differentiate the object from the subject)
Matt Bakalar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100601/c07f8121/attachment.html>

More information about the Ironpython-users mailing list