[IronPython] Trying to set field to bool, get "TypeError: Argument cannot be null."

Count László de Almásy calmasy at gmail.com
Sat Jul 18 08:32:04 CEST 2009


I need some help understanding what I'm doing wrong here.
Settings.ALWAYS_DECODE_OBJECTS is set in C# like the following:

public bool ALWAYS_DECODE_OBJECTS = true;

But trying to set it to "True" in IPy blows up with the following traceback:

IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.1433
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReference("OpenMetaverse.dll")
>>> clr.AddReference("OpenMetaverseTypes.dll")
>>> from OpenMetaverse import *
>>>
>>> Settings.ALWAYS_DECODE_OBJECTS = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Microsoft.Scripting.Core", line unknown, in Convert
  File "Microsoft.Scripting.Core", line unknown, in Convert
  File "Microsoft.Scripting.Core", line unknown, in RequiresCanRead
TypeError: Argument cannot be null.
Parameter name: expression
>>>

-- 
Cheers, László



More information about the Ironpython-users mailing list