#108 py2exe 0.6.8, bundle_files = 1, and tkinter: crash

open
nobody
None
5
2008-07-30
2008-07-30
nanotube
No

Using TKinter, and bundle_files =1, i get an immediate crash. Here's my setup:

winxp sp2
py2exe 0.6.8
python 2.5.1

My test file is "example.py", as follows:
#### start
from Tkinter import *
if __name__ == '__main__':
print "hello"
#### end

my setup.py is as follows:
#### start
from distutils.core import setup
import py2exe

setup(
options = {'py2exe': {'bundle_files': 1}},
zipfile = None,

console=['example.py'])
#### end

it compiles just fine, but when running the "example.exe" that is produced in the "dist" directory, it immediately gets the error message "example.exe has encountered a problem and needs to close. We are sorry for the inconvenience".

using the same setup.py, but with bundle_files = 3 works fine; using bundle_files = 2 causes the same crash.

I hope this is sufficient information to replicate this bug. I will be happy to provide any other info if you need it - just post back here.

Discussion


  • Anonymous
    2011-09-19

    I "fixed" this by editing site-packages/py2exe/build_exe.py, adding "tcl85.dll" and"tk85.dll" to the "dlls_in_exedir" list -- meaning that they get put next to the .exe rather than bundled inside it. Slightly messy, but much better than bundled=3