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

Dino Viehland dinov at microsoft.com
Thu Jan 15 19:12:58 CET 2009


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



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


More information about the Ironpython-users mailing list