Skip to content
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

PdfiumError: Failed to load document (PDFium: File access error). #401

Closed
KikeVen opened this issue Nov 29, 2024 · 5 comments
Closed

PdfiumError: Failed to load document (PDFium: File access error). #401

KikeVen opened this issue Nov 29, 2024 · 5 comments

Comments

@KikeVen
Copy link

KikeVen commented Nov 29, 2024

Windows 11
venv 3.10
32 GB RAM

(venv) PS ...> marker_gui

File "D:\Users\k\Documents\03_work\0_python\1_sandbox\marker-pdf\venv\lib\site-packages\pypdfium2\_helpers\document.py", line 678, in _open_pdf
    raise PdfiumError(f"Failed to load document (PDFium: {pdfium_i.ErrorToStr.get(err_code)}).")

 (venv) PS ...> marker_single PRODUCT_ROADMAP.pdf

lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\ub97c' in position 2662: character maps to <undefined>

This application is far from ready. Thank you

@VikParuchuri
Copy link
Owner

Your system encoding is not utf-8. You can set PYTHONIOENCODING=utf8. I'll force utf-8 encoding in a future update

@Xgz20
Copy link

Xgz20 commented Dec 4, 2024

Windows 10
Python 3.11.9

hi, set the environment variables, but after importing the pdf is still reported this error, can help explain the reason, thank you very much!
marker-error
PixPin_2024-12-04_16-55-26

Your system encoding is not utf-8. You can set PYTHONIOENCODING=utf8. I'll force utf-8 encoding in a future update

@VikParuchuri
Copy link
Owner

This is actually a different error - looks like the file can't be accessed - are permissions correct? If you can share the PDF, I can take a look.

@andrebagoes
Copy link

image
its working on single one, but if using folder i have the same problem as Xgz20

and also im on the same envireontment win 10 wiht 3.11

@andrebagoes
Copy link

This is actually a different error - looks like the file can't be accessed - are permissions correct? If you can share the PDF, I can take a look.

its a path issue i supoose, because when i hit it with single one, it hit file directly, but when its folder, its having the trouble, any idea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants