Python executable crashes built with cx_Freeze - python

I've got a simple script for message encryption and converting result into QR Code. It uses pycrypto, reportlab and tkinter. Here's the source: click
It works correctly, but if I build it with cx_Freeze, it crashes when attempting to encrypt a message: screenshot
P.S. I also tried py2exe, but the program crashes on start with no debug output.

I solved this issue by editing parser.py (C:\Python33\lib\html\parser.py): patch

Related

Error when transforming my Python code to .EXE using Auto Py to Exe

After converting my Python code to an executable, I am getting the following fatal errors when trying to run the program:
1. Failed to run pyiboot01_bootstrap script
2. Error: "NoneType" object has no attribute "write"
3. Error described in the figure: pic3.jpg
Error 3
Note: The program works perfectly when running on VS Code. The program is basically an interface that extracts data from a text file. I attached the program below and the screens with the code that generated my .exe file
Any suggestions?
The problem may be with pyinstaller itself..
Reinstall pyinstaller and auto-py-to-exe and try again..

Python exe file fails due to ModuleNotFoundError: Numpy. This is confusing because numpy is already installed and the program works in Pycharm

I've written a Python program using pandas in Pycharm which works really well. However when I try to convert the Python program into an .exe file using pyinstaller in command prompt, the program fails. It successfully converts to an exe file but wehen I execute the program, a new window appears for 0.25 seconds and than terminates. I took a print screen of the window and the error it says is
"ModuleNotFoundError: No module named numpy. "
This is really confusing as Numpy is installed and the program executes perfectly in pycharm. I've tried copying and pasting the code to a new file, and created a new python file with that code. Still getting the same issue. I'd appreciate any advice you can provide :)

How can I compile a GUI python program into .exe

I am using Python 3.7.0 with tkinter to create an executable GUI
I've tried PyInstaller to create the executable GUI it does't throw an error but when I run the program windows shows an error message.
When I click show problem details this is what it shows:
Problem Event Name: APPCRASH
Application Name: Jpeg-Raw_WizardGUI.exe
Application Version: 0.0.0.0
Application Timestamp: 5a2e9f94
Fault Module Name: ucrtbase.DLL
Fault Module Version: 10.0.10240.16390
Fault Module Timestamp: 55a5bf73
Exception Code: 40000015
Exception Offset: 0007d85a
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 2057
Additional Information 1: c89f
Additional Information 2: c89f96664d7d2cd53e94623624561d56
Additional Information 3: 25d2
Additional Information 4: 25d26db9b8f08829e05b4d3e158d5678
I've tried searching online and have not found a solution
Thanks in advance
As I answered here.You are using python 3.7. As far as I have tested , modules like pyinstaller and cx_Freeze don't seem to be working in this version. Try uninstalling your python 3.7 (don't forget to backup your files before), and installing python 3.6.3 or any other python 3 version except python 3.7.
Edit:
In comments, you said that windows doesn't throw an error anymore but instead of a GUI window opening a console window opens for a second and then closes. Well, changing the version worked but now it is problem either with your program or with pyinstaller. You can use my Python Executable File Maker and let me know if it works fine or throw any error or shows improper behavior.

Runnable exe error after using pyinstaller to convert from python

I tried to convert a python file to an exe file to run in another computer which not install python and library. I used pyinstaller and its success to make an exe file. But, when I run it(.exe) an error appears:
In my function, the error in this line:
pyautogui.click()
The function mouse movement pyautogui.moveTo(536, 49, 2, pyautogui.easeInOutQuad)work ok but stuck and waring error at pyautogui.click().
So, is the reason for the error caused by pyautogui lib? And have any idea to fix it? I using python 3.5 and as I know have only pyinstaller work with.

Issues with pyinstaller

I have created a working GUI program (using tkinter), but when I try to compile it using pyinstaller (py2exe only works for python 2.6 and I used 2.7 for the program), it doesn't work. I have 2 files: program.py, and data.xml. The program uses the xml document to retrieve information and display it to the window. I have looked all over, but no one seems to have had a similar problem, and the pyinstaller documentation is useless. the command I used was
python pyinstaller.py -w -mdata.xml -nProgram program.py
It appears to make the spec file fine, but generates an error with a large traceback upon build:
pyinstaller.utils.winmanifest.invalidManifestError: Invalid root element <items> - has to be one of <assembly>, <assemblyBinding>, <configuration>, <dependentAssembly>
and quits the build process. This is the first time I have tried to build an executable for a project, so I'm kind of shooting in the dark here. Did I forget to do something, or did I just find a bug in pyinstaller's program?
Normally I wouldn't answer my own question, but I have solved the issue and I think others should know about this. When creating your program and using an xml with it, you must have the root tag (the first one) as <assembly>. Not sure why, but it works when I do that. also, don't forget to use the --hidden-import=Module command if you imported anything into your program.

Categories

Resources