Kurzum: Egal was ich probiere, ich erhalte immer den Fehler struct.error: required argument is not an integer.
Ich vermute einen Bug in cx_Freeze, kann das jemand bestätigen oder mache ich was falsch? Einfacher als dieses Beispiel geht es kaum, das wird so auch in jedem Tutorial beschrieben... (Edit: Wie soeben getestet passiert das auch bei den von cx_Freeze mitgelieferten Beispielen unter C:\Python31\Lib\site-packages\cx_Freeze\samples\simple etc.).
Mein Programm:
Code: Alles auswählen
print("Hello World!")
Code: Alles auswählen
from cx_Freeze import setup, Executable
setup(
name = "My Program",
description = "A simple Hello World program.",
version = "0.1",
executables = [Executable("program.py")]
)
Code: Alles auswählen
C:\Python31\python.exe setup.py build
Code: Alles auswählen
running build
running build_exe
creating directory build\exe.win32-3.1
copying C:\Python31\lib\site-packages\cx_Freeze\bases\Console.exe -> build\exe.w
in32-3.1\program.exe
copying C:\WINDOWS\system32\python31.dll -> build\exe.win32-3.1\python31.dll
Traceback (most recent call last):
File "setup.py", line 13, in <module>
executables = [Executable("program.py")]
File "C:\Python31\lib\site-packages\cx_Freeze\dist.py", line 359, in setup
distutils.core.setup(**attrs)
File "C:\Python31\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\Python31\lib\distutils\dist.py", line 919, in run_commands
self.run_command(cmd)
File "C:\Python31\lib\distutils\dist.py", line 938, in run_command
cmd_obj.run()
File "C:\Python31\lib\distutils\command\build.py", line 128, in run
self.run_command(cmd_name)
File "C:\Python31\lib\distutils\cmd.py", line 315, in run_command
self.distribution.run_command(command)
File "C:\Python31\lib\distutils\dist.py", line 938, in run_command
cmd_obj.run()
File "C:\Python31\lib\site-packages\cx_Freeze\dist.py", line 231, in run
freezer.Freeze()
File "C:\Python31\lib\site-packages\cx_Freeze\freezer.py", line 470, in Freeze
self._FreezeExecutable(executable)
File "C:\Python31\lib\site-packages\cx_Freeze\freezer.py", line 160, in _Freez
eExecutable
self._AddVersionResource(exe.targetName)
File "C:\Python31\lib\site-packages\cx_Freeze\freezer.py", line 105, in _AddVe
rsionResource
stamp(fileName, versionInfo)
File "C:\Python31\lib\site-packages\win32\lib\win32verstamp.py", line 157, in
stamp
vs = VS_VERSION_INFO(vmaj, vmin, vsub, vbuild, sdata, vdata, is_debug, is_dl
l)
File "C:\Python31\lib\site-packages\win32\lib\win32verstamp.py", line 105, in
VS_VERSION_INFO
result = pad32(result) + StringFileInfo(sdata) + VarFileInfo(vdata)
File "C:\Python31\lib\site-packages\win32\lib\win32verstamp.py", line 83, in S
tringFileInfo
result = pad32(result) + StringTable('040904E4', data)
File "C:\Python31\lib\site-packages\win32\lib\win32verstamp.py", line 75, in S
tringTable
result = result + String(k, v)
File "C:\Python31\lib\site-packages\win32\lib\win32verstamp.py", line 65, in S
tring
result = struct.pack('hh', len(value)/2, 1) # wValueLength, wType
struct.error: required argument is not an integer