When using the Py2exe program snippet given in http://www.daniweb.com/code/snippet499.html
I get the following error message:

Traceback (most recent call last):
File "C:/Python24/hate me/p2e_test1.pyw", line 29, in -toplevel-
console = [{"script": 'hateme2.pyw'}] )
File "C:\PYTHON24\lib\distutils\core.py", line 166, in setup
raise SystemExit, "error: " + str(msg)
SystemExit: error: command 'C:\PYTHON24\PYTHONW.EXE' failed with exit status 1


I am not sure, but I think it might have to do with my versions of the programs. I use Python24, Py2exe 0.6.5 win32-py2.4, my O.S. is Windows 98, and I saved the files in their own folder called 'hate me', which should contain the files hateme2.pyw and p2e_test1.pyw in the python24 directory (i believe, I created it by running Py24, file, open, create new folder).

So, I would appreciate it if anybody would be able to assist me in what I am doing wrong.

Any program with extension .pyw is considered a windows program, not a console program!

so i need to use a .py extension then? Is there still a way to run the program anywhere else besides that ugly ms-dos looking client thing?

I changed all my files to .py extensions and now get a new traceback error message:

Traceback (most recent call last):
File "C:/Python24/p2e_test1.py", line 29, in -toplevel-
console = [{"script": 'hateme2prog.py'}] )
File "C:\PYTHON24\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\PYTHON24\lib\distutils\dist.py", line 946, in run_commands
self.run_command(cmd)
File "C:\PYTHON24\lib\distutils\dist.py", line 966, in run_command
cmd_obj.run()
File "C:\Python24\Lib\site-packages\py2exe\build_exe.py", line 218, in run
self._run()
File "C:\Python24\Lib\site-packages\py2exe\build_exe.py", line 285, in _run
self.create_binaries(py_files, extensions, dlls)
File "C:\Python24\Lib\site-packages\py2exe\build_exe.py", line 500, in create_binaries
self.copy_dlls(dlls)
File "C:\Python24\Lib\site-packages\py2exe\build_exe.py", line 422, in copy_dlls
self.copy_dlls_bundle_files(dlls)
File "C:\Python24\Lib\site-packages\py2exe\build_exe.py", line 472, in copy_dlls_bundle_files
self.patch_python_dll_winver(dst)
File "C:\Python24\Lib\site-packages\py2exe\build_exe.py", line 905, in patch_python_dll_winver
add_resource(unicode(dll_name), data, RT_STRING, id, delete)
RuntimeError: this function requires unicows.dll in the Python directory on Win 95/98/Me

I do not understand what is meant by: requires unicows.dll in the Python directory on Win 95/98/Me,
does this mean that I need to create a folder named unicows.dll containing the p2e_test1.py and hateme2prog.py files (I renamed them)?
I will try that just in case.

EDIT: I actually did see unicows.dll when I ran Python24, went to file, open (or save as): it was listed with a folder icon, it was empty, until I put p2e_test1,py and hateme2prog.py in it. But I still get the same traceback error.

Are you using Windows98 or Windows ME operating system on your computer? Also, are you using unicode characters? That would be the only time you would have to worry about Unicows.dll. It is actually in the Python24 folder.

Unicows.dll is the Unicode Layer DLL for Windows 9x and ME (Windows NT, 2000, and XP already provide Unicode support).

Unicode is a standard for representing characters as integers. Unicode uses 16 bits rather than the ASCII standard of 7 bits to enable more than 65,000 unique characters to be represented. As a result, languages such as Greek, Chinese, and Japanese are able to be supported.

If you use IDLE or DrPython to run your code from, then you don't have to look a the ugly DOS window, even with .py files.

Yeah, I use WIN 98. As for the Unicode thing, I have no clue. I ended up giving up on the same problem when building websites. I couldn't declare the encoding or something with javascript. I never understood Unicode or what it entails, how to know if I use what, and how to declare it and get it to work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.