If you submit enough information about your problem, we will be able to help you quicker.
[color=var(--color-text-link)]Before submitting a report[color=var(--color-text-link)]Make sure it's a bugIf a program get packaged fine, but the resulting application crashes, this most often is caused by missing files in the package. If you get ImportErrors or File not found messages, you can be very sure this is the case.
Use a virtual environment (virtualenv or pyvenv) so you have a well-defined development environment.
Use the latest development version. Often issues are solved there already. Simply use pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip to install.
Run your frozen program from a command window (shell) — instead of double-clicking on it — so you can see its output.
Package your program in --onedir mode. If this does work, but --onefile mode does not, this most times is an indicator for a problem within your application or one of the libraries you are using.
Package without UPX, say: use the option --noupx or set upx=False in your .spec-file. Some libraries are known to not work with this. And upx is known to have issues when compressing .dlls.
Important: Never use --onefile for debugging. Try solving the problem in --onedir mode. This is much easier since you can easily see what gets collected and digging into problems is much easier, too.
Note: The tool pyi-archive_viewer can be used to look into the packed application (the .exe file) and verify all required modules and data-files are there. You'll have to look into outPYZ*.pyz, too. Please see the the manual for [color=var(--color-text-link)]how to use pyi-archive_viewer.
Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.
If you do not have any idea about what is missing, try looking at the files and dlls your program is using.
On Unix/Linux use strace -f -e trace=open (or … trace=file) to see which files are fail reading. Mind redirecting stderr into a file (2>/tmp/trace.log).
On Windows use one of these tools:
If some data file (e.g. an icon or a language text) is missing, try to collect all data files, see [color=var(--color-text-link)]Recipe Collect Data files.
If some module is missing (e.g. you get an ImportError):
If the problem still pertains, it looks like a bug :-\
[color=var(--color-text-link)]When submitting a bug[color=var(--color-text-link)]Information we needWhat is the exact problem?
Software versions you are using.
What platform and which version you are working on (Windows, Linux, OS X).
A minimal example program which shows the error. Ideally this is a one-liner :-)
Did you try implementing a hook or run-time-hook (rthook) to solve the problem? If so, please include the hook file.
Please include any other information which you think may by helpful for fixing, while reducing as much a possible. Please add logfiles as attachments. Please make sure to attach the log output generated by PyInstaller:
Run the PyInstaller command and capture its output, as shown:
pyinstaller [options] --log-level DEBUG > out.txtUpload out.txt to [color=var(--color-text-link)]http://gist.github.com and note the link in the bug description.
Please try latest development version and let us know if the bug is already fixed there. Simply use pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip to install the latest git version.
Errors that mention any of the following will indicate a problem with the bundling of Windows Side-by-side Assemblies with your built application:
To get more information about Windows Side-by-Side errors, please run the following commands in the Windows command shell and include the resulting trace.txt with your error report:
> sxstrace trace -logfile:trace.log> (run your program here)> (press ENTER to stop tracing)> sxstrace parse -logfile:trace.log -outfile:trace.txt> start trace.txtAdditional information about Side-by-side errors will be available in the Event Viewer, under the log Application, with the labels Error and SideBySide. Also include the information from the log entry if possible.
扫码加好友,拉您进群



收藏
