Comments (6)
I haven't been able to reproduce this, but according to https://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe#30313091, pythonw.exe does not provide stdout or stderr, and attempting to write to them may cause an exception.
Certainly the PDF file you are using causes PyMuPDF to generate a warning diagnostic on stdout or stderr, so i think this may be causing the exception when run by pythonw.exe.
Is there any particular reason why you are using pythonw.exe here?
from pymupdf.
I have a GUI application packed with pyinstaller, for sorting, counting, merging documents from different sources.
It was my guess too, that a warning and lack of stdout/stderr could cause that error, I can escape and pass it, but I have done sanity check and tried the example in a different environment. Didn't get the SystemError with python 3.10.11 and pymupdf 1.23.0. And I made mistake yesterday, I'm using python 3.11.9 currently, not 3.12.
from pymupdf.
I'm still struggling to reproduce the original problem, even using python-3.11 on windows. But i have found that print()
copes even if sys.stdout is None.
In the meantime there's another open issue about use with pyinstaller, which has lead to some changes to make all diagnostics go through python print()
, instead of variously being generated with sys.stderr.write(), PySys_WriteStdout() etc.
It's possible that these changes may help with this issue. But as i can't reproduce it, i think we'll have to wait for you to test a future release.
from pymupdf.
ok.
I've checked different pymupdf versions in fresh venvs. The error appears with new pymupdf implementation in 1.23.9, python version doesn't matter.
from pymupdf.
Fixed in 1.24.4. Thanks.
from pymupdf.
That's great, thanks for reporting.
from pymupdf.
Related Issues (20)
- Widget font not being updated HOT 3
- Check the hash of the downloaded MuPDF tarball
- pix = page.get_pixmap(matrix=matrix, clip=rect) recommend to modify function get_pixmap HOT 1
- subset_fonts error exit without exception/warning HOT 6
- insert_pdf gives TypeError HOT 4
- Embedded full-text search index HOT 4
- Page.delete_widget() doesn't fully remove the widget, other programs still detect the widgets HOT 14
- regression: fill_textbox: IndexError: pop from empty list HOT 5
- Unable to create a checked radiobutton HOT 1
- draw_rect scaled to very small size HOT 5
- set_toc method error HOT 8
- Marked content sequences in text trace dictionary HOT 3
- 1.24.2/1.24.3: spurious characters introduced when using subset_fonts and insert_pdf HOT 7
- PyMuPDF 1.24.4 causes "segmentation fault" under Python 3.12 and old MAC OS HOT 13
- pixmap.invert_irect(pixmap.irect) take 7 seconds HOT 3
- cygwin x64 pip3 install pymupdf error HOT 2
- When extracting a numbered list, the result is not as expected. HOT 3
- Small size after apply fitz.TOOLS.set_small_glyph_heights(True) HOT 2
- page.get_label() gets wrong label on the first page of doc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymupdf.