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

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\schor\\AppData\\Local\\Temp\\tmpoaply4el.pdf' #267

Open
Schorakbi opened this issue Aug 22, 2024 · 5 comments

Comments

@Schorakbi
Copy link

Getting this error when trying the gui and i run the marker

image

@qwinsi
Copy link

qwinsi commented Aug 22, 2024

I had this same error.

Running marker_gui in an Ananoda environment on Windows 11.

@G999n
Copy link

G999n commented Aug 25, 2024

Have you tried the following?

  • relocating the pdf file to another directory outside the C:\Users folder
  • removing blank spaces from the document name

@motiteux
Copy link

motiteux commented Sep 1, 2024

in marker_app.py
I changed the line 110 from
with tempfile.NamedTemporaryFile(suffix=".pdf") as temp_pdf:

to

with tempfile.NamedTemporaryFile(suffix=".pdf", delete=False) as temp_pdf:

And it worked

@JinCheng666
Copy link

in marker_app.py I changed the line 110 from with tempfile.NamedTemporaryFile(suffix=".pdf") as temp_pdf:

to

with tempfile.NamedTemporaryFile(suffix=".pdf", delete=False) as temp_pdf:

And it worked

I encountered the same problem, according to your way, has solved this problem. I hope the authorities change the code.
@motiteux

@TatamiHermit
Copy link

# Run Marker
temp_pdf_path = os.path.join("C:\\temp", "temp_pdf.pdf")
with open(temp_pdf_path, "wb") as temp_pdf:
    temp_pdf.write(in_file.getvalue())
    filename = temp_pdf_path
    md_text, images, out_meta = convert_pdf(filename, languages, max_pages, ocr_all_pages)
md_text = markdown_insert_images(md_text, images)

# with tempfile.NamedTemporaryFile(suffix=".pdf") as temp_pdf:
#     temp_pdf.write(in_file.getvalue())
#     temp_pdf.seek(0)
#     filename = temp_pdf.name
#     md_text, images, out_meta = convert_pdf(filename, languages, max_pages, ocr_all_pages)
# md_text = markdown_insert_images(md_text, images)

i just use another temp path, worked fine

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

6 participants