[IronPython] Issues with System members when using pyc.py

Michael Foord fuzzyman at voidspace.org.uk
Thu Jan 15 20:54:12 CET 2009


Dino Viehland wrote:
>
> This is a bug – we’re not adding references to mscorlib/System.dll 
> when we run your app. You can just:
>
> import clr
>
> clr.AddReference(‘mscorlib’)
>
> clr.AddReference(‘System’)
>
> to your program. Alternately you could modify pyc.py to send these two 
> strings in the references array to InitializeModule but that’s more 
> complex. I’ve filed a bug: 
> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20623
>

Ahhh... that decision not to do this by default bites again. :-)

Michael
>
> *From:* users-bounces at lists.ironpython.com 
> [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Renaud Durand
> *Sent:* Thursday, January 15, 2009 9:14 AM
> *To:* users at lists.ironpython.com
> *Subject:* [IronPython] Issues with System members when using pyc.py
>
> Hi,
>
> I'm new at IronPython and i'm trying to compile a small app using pyc.py.
> When launched with the interpreter there's no issue. But when I launch 
> the executable I get this :
>
> > Unhandled Exception: System.MissingMemberException: 'namespace#' 
> object has no attribute 'DateTime'
>
> or this while importing pySerial :
>
> > Unhandled Exception: System.MissingMemberException: 'namespace#' 
> object has no attribute 'Array'
> and
> > Unhandled Exception: System.MissingMemberException: 'namespace#' 
> object has no attribute 'IO'
>
> Does someone have an idea ? Where am I wrong ?
>
> Thanks.
>
> -- 
> Renaud Durand
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog





More information about the Ironpython-users mailing list