[Ironpython-users] IronPython, Daily Digest 11/15/2011

no_reply at codeplex.com no_reply at codeplex.com
Wed Nov 16 17:09:32 CET 2011

Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] Misleading error message with clr.AddReferenceToFileAndPath on a UNC path



1. [New issue] Misleading error message with clr.AddReferenceToFileAndPath on a UNC path
User jperraud has proposed the issue:

"Trying to do something like:
>>> clr.AddReferenceToFileAndPath(r'\\somename\a\b\c\d\e.dll')
the IPY console reports:
IOError: System.IO.IOException: file does not exist: \\somename\a\b\c\d\e.dll
   at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) in c:\src\ironlanguages\m
ain\Languages\IronPython\IronPython\Runtime\ClrModule.cs:line 488

The file definitely exists. Running ipy with debug symbols, it appears that a NotSupportedException exception is silently trapped in PythonContext. The message is much more useful and accurate and should be passed to the console:

System.NotSupportedException occurred
  Message=An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
       at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
       at System.Reflection.Assembly.LoadFile(String path)
       at IronPython.Runtime.PythonContext.TryLoadAssemblyFromFileWithPath(String path, Assembly& res) in c:\src\ironlanguages\main\Languages\IronPython\IronPython\Runtime\PythonContext.cs:line 1348

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20111116/ecca6a52/attachment.html>

More information about the Ironpython-users mailing list