I've had some problems with py2exe which I *think* highlights a bug in distutils. I had a mysterious problems with py2exe causing a 'crash' - not an exception but a full on windows 'the memory referenced could not be read' crash. I could reproduce this problem on two machines - (both windows XP) one with python 2.3 and another with python 2.4, however no-one else had the same problem. In order to trace the exact point the crash was occurring I set the DISTUTILS_DEBUG environment variable. The crash I was investigating then disapeared (I told you it was mysterious) - but I got a traceback from within distutils. The traceback occurs within distutils.command.install - the 'dump_dirs' function in install.py. The offending code is : val = getattr(self, opt_name) print " %s: %s" % (opt_name, val) when run from py2exe this causes an AttributeError for the 'no_compile' attribute. If replaced with the following code, it works fine. try: val = getattr(self, opt_name) except AttributeError: print 'Attribute not found :', opt_name else: print " %s: %s" % (opt_name, val) (This is for the Movable Python project - which works fine :-) Regards, Fuzzyman http://www.voidspace.org.uk/python/index.shtml
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On Mon, Jan 17, 2005 at 11:58:23AM +0000, Michael Foord wrote:
The traceback occurs within distutils.command.install - the 'dump_dirs' function in install.py. The crash occurs when you use negated options and turn on debugging.
I thought I submitted a patch for this bug ages ago - but cannot find the thing in the SF patch tracker any more. Hmm, must have sent it only to the list or whatever. Anyway, I created a new patch (against CVS) here: https://sourceforge.net/tracker/index.php?func=detail&aid=1103844&group_id=5470&atid=305470 Regards, Bastian - -- ,''`. Bastian Kleineidam : :' : GnuPG Schlüssel `. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E `- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFB67HPeBwlBDLsbz4RAsWpAKC3k5Wc2xG6WrMSTLKmcJd1XNFiCACZAa+m 0jjTkNO6SFGMwtCFoPcqKFk= =805I -----END PGP SIGNATURE-----
participants (2)
-
Bastian Kleineidam
-
Michael Foord