[IronPython] None in sys.path

Michael Foord fuzzyman at voidspace.org.uk
Fri May 18 20:14:35 CEST 2007

Hello all,

Weird pseudo-bug in IronPython 1.1.  If you accidentally (!) None into 
sys.path then a failed import will raise a TypeError rather than an 

 >>> import sys
 >>> sys.path.append(None)
 >>> import wibble
Traceback (most recent call last):
  File , line 0, in <stdin>##81
  File , line 0, in __import__##4
  File mscorlib, line unknown, in Combine
TypeError: Value cannot be null.
Parameter name: path1

CPython is resilient against this, ignoring the entry. Maybe this isn't 
exactly a *bug* in IronPython - but it was the cause of a problem that 
took us a while to find... :-)

Michael Foord

More information about the Ironpython-users mailing list