[IronPython] IronPython 1.1.1 wish-list?

Dino Viehland dinov at exchange.microsoft.com
Wed Jan 2 18:43:43 CET 2008

This is easy enough to fix for 1.1.1.  The issue here (I think) is that somewhere in your sys.path you have a file called Oracle.exe that contains exactly 1 type (which, not surprisingly, is not a subtype of CompiledModule).  Apparently we can create an instance of that type but because it's not a CompiledModule we get null and blow up trying to load the module.

In general we just need to harden those code path to a bunch of potential failures: More than one type, types w/o public ctors, types whose ctor's throw, etc...  That's an easy enough change to make for v1.1.  Also this code path doesn't exist in v2.0 at all right now so it doesn't suffer from this issue.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Vizcayno
Sent: Saturday, December 29, 2007 6:48 AM
To: users at lists.ironpython.com
Subject: Re: [IronPython] IronPython 1.1.1 wish-list?

Hello Dino:
I send you the results running from my DOS WinXP SP2 console:
.ipy -X:ExceptionDetail
IronPython 1.1 (1.1) on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
['c:\\os\\ipy\\src', 'c:\\os\\ipy\\lib', 'c:\\python25\\lib', 'c:\\os\
\IPY', 'c:\\os\\IPY\\Tutorial', 'C:\\os\\ic_ora\\
tantclient_11_1\\odp.net\\bin\\2.x', 'C:\\os\\SQLite\\bin', 'c:\\os\
\ipy\\django_src', 'c:\\os\\ipy\\django_src\\django
in', 'c:\\os\\IPY\\IronPython-1.1\\Lib', 'c:\\os\\IPY\
\IronPython-1.1', 'c:/os/ipy/django_src']
>>> import sys
>>> import clr
>>> import System
>>> clr.AddReference("Oracle.DataAccess")
>>> import Oracle.DataAccess.Client
Object reference not set to an instance of an object.
   at IronPython.Runtime.Importer.LoadPreCompiled(SystemState state,
String fullName, String fileName)
   at IronPython.Runtime.Importer.TryLoadModule(SystemState state,
String fullName, String pathName, PythonModule& ret)
   at IronPython.Runtime.Importer.ImportFromPath(SystemState state,
String name, String fullName, List path)
   at IronPython.Runtime.Importer.ImportTopAbsolute(PythonModule mod,
String name)
   at IronPython.Runtime.Importer.ImportModule(ICallerContext context,
String modName, Boolean bottom)
   at IronPython.Modules.Builtin.__import__(ICallerContext context,
String name, Object globals, Object locals, Object
   at __import__##4(ICallerContext , Object , Object , Object ,
Object )
context, Object arg0, Object arg1, Object
g2, Object arg3)
   at IronPython.Runtime.Calls.BuiltinFunction.Call(ICallerContext
context, Object arg0, Object arg1, Object arg2, Obje
   at IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext
context, Object func, Object arg0, Object arg1,
ect arg2, Object arg3)
   at IronPython.Runtime.Operations.Ops.Import(PythonModule mod,
String fullName)
   at <stdin>##91(ModuleScope )
   at IronPython.Hosting.CompiledCode.Run(ModuleScope moduleScope)
   at IronPython.Hosting.PythonEngine.ExecuteToConsole(String text,
EngineModule engineModule, IDictionary`2 locals)
   at IronPython.Hosting.PythonEngine.ExecuteToConsole(String text)
   at IronPythonConsole.PythonCommandLine.DoOneInteractive()
interactiveAction, Boolean& continueIn
SystemError: Object reference not set to an instance of an object.

Note. I am now testing IronPython Studio and when using and executing
the same previous commands I had no errors!!. I show you the results:
>>>import sys
>>>print sys.version
2.4.0 (IronPython 1.1.1 (1.1.1) on .NET 2.0.50727.1433)
>>>import sys
>>>import clr
>>>import System
>>>import Oracle.DataAccess.Client
['FailoverEvent', 'FailoverReturnCode', 'FailoverType',
'OnChangeEventHandler', 'OracleBulkCopy',
'OracleBulkCopyColumnMappingCollection', 'OracleBulkCopyOptions',
'OracleClientFactory', 'OracleCollectionType', 'OracleCommand',
'OracleCommandBuilder', 'OracleConnection',
'OracleConnectionStringBuilder', 'OracleDataAdapter',
'OracleDataReader', 'OracleDataSourceEnumerator', 'OracleDbType',
'OracleDependency', 'OracleError', 'OracleErrorCollection',
'OracleException', 'OracleFailoverEventArgs',
'OracleFailoverEventHandler', 'OracleGlobalization',
'OracleInfoMessageEventArgs', 'OracleInfoMessageEventHandler',
'OracleNotificationEventArgs', 'OracleNotificationInfo',
'OracleNotificationRequest', 'OracleNotificationSource',
'OracleNotificationType', 'OracleParameter',
'OracleParameterCollection', 'OracleParameterStatus',
'OracleRowUpdatedEventArgs', 'OracleRowUpdatedEventHandler',
'OracleRowUpdatingEventArgs', 'OracleRowUpdatingEventHandler',
'OracleRowidInfo', 'OracleRowsCopiedEventArgs',
'OracleRowsCopiedEventHandler', 'OracleTransaction',
'OracleXmlCommandType', 'OracleXmlQueryProperties',
'OracleXmlSaveProperties', '__builtins__', '__dict__', '__name__']
I am a little confused by this.

Users mailing list
Users at lists.ironpython.com

More information about the Ironpython-users mailing list