[IronPython] ValueError: Absolute path information is required

Martin Maly Martin.Maly at microsoft.com
Fri Jan 6 09:41:56 PST 2006


Before we release fix for this in the next IronPython release, what you can do is load the assembly using the System.Reflection.Assembly.LoadFrom method and then use:
clr.AddReference with the assembly object. That gives you absolute control over the assembly loading process:

>>> import System
>>> import clr
>>> clr.References
(mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
 System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
>>> aso = System.Reflection.Assembly.LoadFrom("AgentServerObjects.dll")
>>> aso
AgentServerObjects, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
>>> clr.AddReference(aso)
>>> clr.References
(mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
 System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
 AgentServerObjects, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null)
>>>

Hope this helps
Martin

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Paparipote .
Sent: Friday, January 06, 2006 9:20 AM
To: users at lists.ironpython.com
Subject: [IronPython] ValueError: Absolute path information is required

In Exercise 1: Merlin the Wizard, task 2:
>>>import  clr
>>>clr.AddReferenceToFile("AgentServerObjects.dll")
Traceback (most recent call last):
  File , line 0, in input##1
  File , line 0, in .ctor
  File , line 0, in AddPathList
  File , line 0, in CreateListFromExpressions
ValueError: Absolute path information is required.

Only when I write:
>>>import clr
>>>clr.AddReferenceToFile("C:\Documents and Settings\egironas\My 
>>>Documents\My
>>>Apps\Py\IronPython-1.0-Beta1\Tutorial\AgentServerObjects.dll")

it works. Questions are why? How can I avoid to write all the path?
Best regards.

_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.latam.msn.com/

_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


More information about the users mailing list