-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyMuPDF 1.24.12 with pyinstaller throws error. #3981
Comments
It looks like A workaround might be to set PYMUPDF_MESSAGE before importing pymupdf - see: https://pymupdf.readthedocs.io/en/latest/functions.html#PYMUPDF_MESSAGE |
I have a similar issue, also in Windows. The following code, run with
But If I comment the I tried setting So I'd say one cannot use pymupdf in console-less windows apps for the moment.
I'd say this is |
You can assign os.devnull to stdout and stderr:
I tried to use PYMUPDF_MESSAGE:
but it gives: |
I tried
but is the same, works launched by Agreed that it has to do with std... streams because running Can confirm that some earlier versions of |
It would be useful to see the full output when things fail. I'm particularly interested in what's failing with I have a fairly trivial patch to my tree which should fix the problem in the next release, but i don't have pythonw so i'm not 100% sure if will fix all scenarios. |
Ok, as it happens redirecting stderr to file one recovers So I run
with an environment with But launching with
I don't seem to find documentation for I defined both
|
Ah, thanks for this. PYMUPDF_LOG is deliberately undocumented because it's for internal development debugging; it currently suffers from the same problem as PYMUPDF_MESSAGE when sys.stdout is None. [The second problem is because one needs to prefix the value with I think i know enough now to fix things in the next release; will try to do this in the next few days. |
This addresses #3981.
This addresses #3981.
Traceback (most recent call last): hello, I am also have the same message after packing the files |
Fixed in 1.24.13. |
Description of the bug
Lastest pymupdf with pyinstaller and console option set to false, throws on import AssertionError: No output specified.
Happen with last and older pyinstaller versions, dosen't happen with pythonw.exe.
How to reproduce the bug
pymupdf_test.pyw:
pyinstaller command:
PyMuPDF version
1.24.12
Operating system
Windows
Python version
3.12
The text was updated successfully, but these errors were encountered: