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)
- extract_img error HOT 3
- Text Extraction from PDF Results in Garbled Characters HOT 1
- Performance drop in page.draw_line() & page.draw_rect() after release 1.24.1 HOT 9
- Multiple tokens get concatenated into one HOT 5
- `find_tables()` is not detecting the only table on the page HOT 2
- pdf to image rendering ignore optional content offs HOT 6
- Saving into new PDF: "syntax error: expected object number" HOT 4
- ADD strikethrough to Markdown and HTML export HOT 7
- page.find_tables tab.cells and tab.extract() HOT 2
- Stories: Ordered list count broken with nested unordered list HOT 1
- Page value 0-based and 1-based are not unified HOT 1
- Add text alignment information to text extraction API HOT 1
- class improves namedDest handling HOT 2
- Extract Model Tree Info HOT 6
- truncated font names HOT 4
- Correct Text box is not picked up HOT 3
- get_images() smask value becomes 0 HOT 2
- test_bboxlog_2885 fails with (lib)mupdf 1.24.9 HOT 3
- inconsistent radio button group behavior in Adobe Reader vs Brave browser PDF viewer HOT 1
- i cannot get anything from this pdf,i cannot copy,cannot extract
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.