mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 12:05:58 +03:00
[GH-ISSUE #538] Papermerge-CLI Uploading Error #419
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @drtechnofreak on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/ciur/papermerge/issues/538
papermerge-cli import Uploaded/
Importing Uploaded/23435-9-041.pdf
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 62, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/rest.py", line 150, in upload_document
documents_api_instance.upload_file(
File "/usr/local/lib/python3.10/dist-packages/papermerge_restapi_client/paths/api_documents_document_id_upload_file_name/put.py", line 257, in upload_file
return self._upload_file_oapg(
File "/usr/local/lib/python3.10/dist-packages/papermerge_restapi_client/paths/api_documents_document_id_upload_file_name/put.py", line 235, in _upload_file_oapg
raise exceptions.ApiException(api_response=api_response)
papermerge_restapi_client.exceptions.ApiException: (413)
Reason: Request Entity Too Large
HTTP response headers: HTTPHeaderDict({'Server': 'nginx/1.18.0', 'Date': 'Sat, 18 Mar 2023 21:05:57 GMT', 'Content-Type': 'text/html', 'Content-Length': '183', 'Connection': 'close'})
HTTP response body: b'<html>\r\n<head></head>\r\n\r\n
413 Request Entity Too Large
\r\nnginx/1.18.0\r\n\r\n</html>\r\n'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 62, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/rest.py", line 326, in perform_import
upload_document(
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 72, in inner
raise ApiException from e
papermerge_restapi_client.exceptions.ApiException: (None)
Reason: None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/papermerge-cli", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/main.py", line 107, in _import
perform_import(
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 39, in inner
return func(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 54, in inner
return func(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 72, in inner
raise ApiException from e
papermerge_restapi_client.exceptions.ApiException: (None)
Reason: None
@ptitboogy commented on GitHub (Mar 30, 2023):
Hello,
I've got the same issue with file as small as 2,2 MB.
How are we supposed to bulk import big documents ?
Thanks
@ciur commented on GitHub (Mar 31, 2023):
My guess is that the issue may be with the configurations in this file:
https://github.com/papermerge/docker/blob/master/papermerge/nginx.conf
(according to this article: https://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/)
I mean, in nginx config should be added a line like:
client_max_body_size 100M;
where "100M" is the max document size you can upload.
@ptitboogy commented on GitHub (Mar 31, 2023):
Hi Eugen,
I made the change directly in the running docker image and I confirm that it's working as expected.
@ciur : Can you please add this parameter with a reasonable value for the next image you will build ?
Many thanks for your support.
@drtechnofreak commented on GitHub (Mar 31, 2023):
Hi Guys,
I'm struggling to find the nginx config file within the docker..
Can someone give me the container & path I should be looking for?
Cheers
@ptitboogy commented on GitHub (Mar 31, 2023):
The file to modify within the container is /etc/nginx/nginx.conf
You can add this parameter in the "server" section
@drtechnofreak commented on GitHub (Mar 31, 2023):
Hi, When I try to CD to etc. I get "permission denied: unknown"
I can only get to bin/app I have checked & I am under root with docker exec
@ptitboogy commented on GitHub (Mar 31, 2023):
@drtechnofreak commented on GitHub (Mar 31, 2023):
Thankyou so much.. I'll test to see if it works now :)
@drtechnofreak commented on GitHub (Mar 31, 2023):
Well it fixed the web upload, but the papermerge-cli is still reporting the same error.
I don't want to upload using web as it's a long process with the amount of files I have.
Hopefully fixed in the next pull :0
@ptitboogy commented on GitHub (Mar 31, 2023):
Oops, I forgot to mention that you should restart the nginx service too ...
/etc/init.d/nginx restart
Because it is working on my side and as I understood the parpermerge-cli command use the same REST API
@ciur commented on GitHub (Apr 1, 2023):
I released 2.1.9 which contains above mentioned fix. The max size for uploaded document (max size one document can have) is hardcoded to 100 MB.
I also updated "Import Folders/Document" section in the documentation with instructions about
--taget-uuidoption.Please don't forget to close the ticket in case you think the issue was resolved.
@ptitboogy commented on GitHub (Apr 3, 2023):
Hi,
@ciur : For me it's ok but I'll let @drtechnofreak the opportunity to close his ticket.
@drtechnofreak commented on GitHub (Apr 3, 2023):
Lovely stuff chaps..
I'll see how far PaperMerge can go with around 400gb of PDF's :)