[GH-ISSUE #41] Error while uploading file #31

Closed
opened 2026-02-25 21:31:03 +03:00 by kerem · 3 comments
Owner

Originally created by @sachinpathare on GitHub (Jul 21, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/41

Internal Server Error: /upload/
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\contrib\auth\decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\generic\base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\generic\base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "C:\Users\Admin\papermerge-proj\papermerge\core\views\documents.py", line 282, in post
page_count = get_pagecount(f.temporary_file_path())
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mglib\pdfinfo.py", line 83, in get_pagecount
compl = subprocess.run(
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
[21/Jul/2020 17:46:30] "POST /upload/ HTTP/1.1" 500 128740

Originally created by @sachinpathare on GitHub (Jul 21, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/41 Internal Server Error: /upload/ Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\exception.py", line 34, in inner response = get_response(request) File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\contrib\auth\decorators.py", line 21, in _wrapped_view return view_func(request, *args, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\generic\base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\generic\base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "C:\Users\Admin\papermerge-proj\papermerge\core\views\documents.py", line 282, in post page_count = get_pagecount(f.temporary_file_path()) File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mglib\pdfinfo.py", line 83, in get_pagecount compl = subprocess.run( File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified [21/Jul/2020 17:46:30] "POST /upload/ HTTP/1.1" 500 128740
kerem closed this issue 2026-02-25 21:31:03 +03:00
Author
Owner

@ciur commented on GitHub (Jul 21, 2020):

I think you did not install poppler utils.
Poppler utlities provide a command line utility called - pdfinfo - which is used to figure out number of pages in a PDF document.
Can you double check if you have pdfinfo available, please?

If you type in command line:

$ pdfinfo -v 

You should see something like:

pdfinfo version 0.62.0
Copyright 2005-2017 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
<!-- gh-comment-id:661830255 --> @ciur commented on GitHub (Jul 21, 2020): I think you did not install [poppler utils](https://papermerge.readthedocs.io/en/latest/requirements.html#requirements). Poppler utlities provide a command line utility called - pdfinfo - which is used to figure out number of pages in a PDF document. Can you double check if you have pdfinfo available, please? If you type in command line: ``` $ pdfinfo -v ``` You should see something like: ``` pdfinfo version 0.62.0 Copyright 2005-2017 The Poppler Developers - http://poppler.freedesktop.org Copyright 1996-2011 Glyph & Cog, LLC ```
Author
Owner

@sachinpathare commented on GitHub (Jul 21, 2020):

@ciur i have install package still same error.

<!-- gh-comment-id:661865981 --> @sachinpathare commented on GitHub (Jul 21, 2020): @ciur i have install package still same error.
Author
Owner

@ciur commented on GitHub (Jul 21, 2020):

ah, man, wait a second. You are using Windows machine, right?
I never tested on Windows!
Here in requiremens I mentioned that you need a Unix-flavoured machine (some linux distro or mac os).
Sorry, man, it is not designed to work on Windows :)
Maybe you can try via Docker image ? I never tried to run docker+windows but in theory should work.

<!-- gh-comment-id:661888067 --> @ciur commented on GitHub (Jul 21, 2020): ah, man, wait a second. You are using Windows machine, right? I never tested on Windows! Here in [requiremens](https://papermerge.readthedocs.io/en/latest/requirements.html#requirements) I mentioned that you need a Unix-flavoured machine (some linux distro or mac os). Sorry, man, it is not designed to work on Windows :) Maybe you can try via Docker image ? I never tried to run docker+windows but in theory should work.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#31
No description provided.