Differences between revisions 2 and 3
Revision 2 as of 2004-01-14 12:58:28
Size: 1389
Editor: www
Comment:
Revision 3 as of 2004-04-01 18:29:07
Size: 1555
Editor: nash
Comment: Still broken in 0.5.0 release
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Using the [http://www.jorendorff.com/articles/python/path/ PathModule] from Jason Jorendorff modulfinder.py, which is called by Py2Exe, get's into an endless recursion. Using the [http://www.jorendorff.com/articles/python/path/ PathModule] from Jason Jorendorff, modulefinder.py, which is called by Py2Exe, gets into an endless recursion.
Line 6: Line 6:
{{{os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.path }}} {{{os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.path }}} at which point you get a {{{RuntimeError: maximum recursion depth exceeded}}}.
Line 41: Line 41:

''This is still a problem in py2exe 0.5.0 downloaded on 3/31/04. -- Kent Johnson''

Problem

Using the [http://www.jorendorff.com/articles/python/path/ PathModule] from Jason Jorendorff, modulefinder.py, which is called by Py2Exe, gets into an endless recursion.

It tries to resolve os.path, gets to  os.os.path , further to  os.os.path  and breaks somewhere at os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.path  at which point you get a RuntimeError: maximum recursion depth exceeded.

(Maybe it would be a test to use [http://www.stackless.com/ StackLess] Python, it would run forever or until the maximum string length of pyhton is reached. But maximum string length in Python is only limited by memory, memory is limited by address-space ... )

But apart from joking: it is IMPOSSIBLE to generate an exe with the modern 0.5 Version of Py2Exe when path.py is installed.

Solution

Just rename

site-packages/path.py

to

site-packages/jpath.py

and make sure also to toggle your imports to

   1 import jpath.py

and to delete path.pyc and path.pyo from your site-packages directory.

20041013HAM

Another Solution

Just another solution is to exclude the os.path module in the py2exe build process. This can be done, for example, with the "-e os.path" command line flag.

Or use a py2exe version later than 0.5.0a5, the problem will be fixed there.

-- Thomas Heller

This is still a problem in py2exe 0.5.0 downloaded on 3/31/04. -- Kent Johnson

PathModul (last edited 2008-07-08 11:27:43 by localhost)