Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] Importing .NET types causes ImportExceptions (zipimport handler)
----------------------------------------------
ISSUES
1. [New issue] Importing .NET types causes ImportExceptions (zipimport handler)
http://ironpython.codeplex.com/workitem/34602
User sopelt has proposed the issue:
"When hosting IronPython in a C#/.NET application the first import of a .NET
type (and possibly non-zip python modules?) causes an internally thrown and
ignored IronPython.Runtime.Exceptions.ImportException having not a Zip file as
its message.
This seem to happen during initial construction of the zipimporter.
In situations where third-party libraries are being debugged or profiled in a
project using IronPython this can cause lots of unwanted exceptions and
complicate development.
A minimal example could look like:
namespace ConsoleApplication
{
using IronPython.Hosting;
class Program
{
static void Main(string[] args)
{
var e = Python.CreateEngine();
var source = e.CreateScriptSourceFromString(@"from System import
Guid");
var result = source.Execute();
}
}
}
with the resulting stack at the time of the unwanted exception as
>
> IronPython.Modules.dll!IronPython.Runtime.ZipImportModule.zipimporter.zipimporter(IronPython.Runtime.CodeContext
> context, object pathObj,
> System.Collections.Generic.IDictionary<object,object> kwArgs) Line 142 C#
[Native to Managed Transition]
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.NewInstruction.Run(Microsoft.Scripting.Interpreter.InterpretedFrame
frame) Line 73 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.Interpreter.Run(Microsoft.Scripting.Interpreter.InterpretedFrame
frame) Line 126 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.LightLambda.Run4<System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object,object>(System.Runtime.CompilerServices.CallSite
arg0, IronPython.Runtime.CodeContext arg1, object arg2, object arg3) Line 165
C#
System.Core.dll!System.Dynamic.UpdateDelegates.UpdateAndExecute3<IronPython.Runtime.CodeContext,object,object,object>(System.Runtime.CompilerServices.CallSite
site, IronPython.Runtime.CodeContext arg0, object arg1, object arg2) Unknown
IronPython.dll!IronPython.Runtime.PythonContext.Call(IronPython.Runtime.CodeContext
context, object func, object arg0) Line 2827 C#
IronPython.dll!IronPython.Runtime.Operations.PythonCalls.Call(IronPython.Runtime.CodeContext
context, object func, object arg0) Line 30 C#
IronPython.dll!IronPython.Runtime.Importer.FindImporterForPath(IronPython.Runtime.CodeContext
context, string dirname) Line 884 C#
IronPython.dll!IronPython.Runtime.Importer.ImportFromPathHook(IronPython.Runtime.CodeContext
context, string name, string fullName, IronPython.Runtime.List path,
System.Func<IronPython.Runtime.CodeContext,string,string,string,object>
defaultLoader) Line 836 C#
IronPython.dll!IronPython.Runtime.Importer.ImportFromPath(IronPython.Runtime.CodeContext
context, string name, string fullName, IronPython.Runtime.List path) Line 818
C#
IronPython.dll!IronPython.Runtime.Importer.ImportTopAbsolute(IronPython.Runtime.CodeContext
context, string name) Line 622 C#
IronPython.dll!IronPython.Runtime.Importer.ImportModule(IronPython.Runtime.CodeContext
context, object globals, string modName, bool bottom, int level) Line 262 C#
IronPython.dll!IronPython.Modules.Builtin.__import__(IronPython.Runtime.CodeContext
context, string name, object globals, object locals, object fromlist, int
level) Line 108 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.FuncCallInstruction<IronPython.Runtime.CodeContext,string,object,object,object,int,object>.Run(Microsoft.Scripting.Interpreter.InterpretedFrame
frame) Line 812 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.Interpreter.Run(Microsoft.Scripting.Interpreter.InterpretedFrame
frame) Line 126 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.LightLambda.Run7<System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,string,IronPython.Runtime.PythonDictionary,IronPython.Runtime.PythonDictionary,IronPython.Runtime.PythonTuple,object>(System.Runtime.CompilerServices.CallSite
arg0, IronPython.Runtime.CodeContext arg1, object arg2, string arg3,
IronPython.Runtime.PythonDictionary arg4, IronPython.Runtime.PythonDictionary
arg5, IronPython.Runtime.PythonTuple arg6) Line 282 C#
System.Core.dll!System.Dynamic.UpdateDelegates.UpdateAndExecute6<IronPython.Runtime.CodeContext,object,string,IronPython.Runtime.PythonDictionary,IronPython.Runtime.PythonDictionary,IronPython.Runtime.PythonTuple,object>(System.Runtime.CompilerServices.CallSite
site, IronPython.Runtime.CodeContext arg0, object arg1, string arg2,
IronPython.Runtime.PythonDictionary arg3, IronPython.Runtime.PythonDictionary
arg4, IronPython.Runtime.PythonTuple arg5) Unknown
IronPython.dll!IronPython.Runtime.Importer.ImportLightThrow(IronPython.Runtime.CodeContext
context, string fullName, IronPython.Runtime.PythonTuple from, int level) Line
64 C#
IronPython.dll!IronPython.Runtime.Operations.PythonOps.ImportWithNames(IronPython.Runtime.CodeContext
context, string fullName, string[] names, int level) Line 1805 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.FuncCallInstruction<IronPython.Runtime.CodeContext,string,string[],int,object>.Run(Microsoft.Scripting.Interpreter.InterpretedFrame
frame) Line 764 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.Interpreter.Run(Microsoft.Scripting.Interpreter.InterpretedFrame
frame) Line 126 C#
Microsoft.Dynamic.dll!Microsoft.Scripting.Interpreter.LightLambda.Run1<IronPython.Runtime.FunctionCode,object>(IronPython.Runtime.FunctionCode
arg0) Line 66 C#
IronPython.dll!IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Microsoft.Scripting.Runtime.Scope
scope) Line 79 C#
IronPython.dll!IronPython.Compiler.RuntimeScriptCode.Run() Line 55 C#
Microsoft.Scripting.dll!Microsoft.Scripting.SourceUnit.Execute() Line 249
C#
Microsoft.Scripting.dll!Microsoft.Scripting.Hosting.ScriptSource.Execute()
Line 143 C#
ConsoleApplication2.exe!ConsoleApplication.Program.Main(string[] args) Line
11 C#
[Native to Managed Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile,
System.Security.Policy.Evidence assemblySecurity, string[] args) Unknown
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object
state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callback, object state,
bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callback, object state,
bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callback, object state)
Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown
"
----------------------------------------------
----------------------------------------------
You are receiving this email because you subscribed to notifications on
CodePlex.
To report a bug, request a feature, or add a comment, visit IronPython Issue
Tracker. You can unsubscribe or change your issue notification settings on
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users