mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 20:15:58 +03:00
[GH-ISSUE #361] [Help wanted] "Stapler not found" #286
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#286
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 @crtvrmn on GitHub (Apr 3, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/361
Hello everyone,
im quite a total noob when it comes to unix system. Im running portainer/docker on a raspi 4 with 8gb and i created a new stack with
'---
version: "2.1"
services:
papermerge:
image: ghcr.io/linuxserver/papermerge
container_name: papermerge
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:
- ./volumes/papermerge/Config:/config
- ./volumes/papermerge/Data:/data
ports:
- 8005:8000
restart: unless-stopped'
It seemed like my RasPi was lacking a "new" python version, so i came up with
'wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb && sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb'
(look how beautiful i linked the commands with &&, like someone that knows what he is doing).
The python error went away, i was able to log into the webinterface. But OCR is not working, so i looked at the log files again.
The log keeps telling me "PermissionError: [Errno 13] Permission denied: '/root/.local/bin/stapler'". After having a look at the log (extended version on pastebin https://pastebin.pl/view/6690bdae )
`WARNINGS:
?: Papermerge can't find stapler. Without it, Papermerge won't be able to cut/paste PDF pages.
HINT: Either it's not in your PATH or it's not installed.`
Now im kinda irritated, i thought the stack would "pull" everything it needed? Right now im not really sure what to do, so any pointings into the right direction would be highly appreciated!
thank you in advance!
@URBANsUNITED commented on GitHub (Apr 5, 2021):
As you'll use the Linuxserver Docker container, the stabler should be here:
BINARY_STAPLER = "/usr/local/bin/stapler"
In doubt:
type "which stabler" in your docker console:
Result:
root@e0b33fb76cc4:/# which stapler
/usr/local/bin/stapler
root@e0b33fb76cc4:/#
Cheers
URBANsUNITED
@christo-ph commented on GitHub (Apr 7, 2021):
Hi,
although stapler is there, in path as you described, papermerge still reports that it is unable to find stapler.
Later it reports
and the server fails to start.
What is expected by papermerge to find stapler properly?
@guim31 commented on GitHub (Apr 7, 2021):
I'm facing the exact same issue
@amo13 commented on GitHub (Apr 7, 2021):
are the permissions correct?
ls -lah /root/.local/bin/stapler@christo-ph commented on GitHub (Apr 7, 2021):
Thats not really the case. There is no folder
/root/.local/bin/Papermerge is somehow looking in the wrong place. It should be
/usr/local/bin@amo13 commented on GitHub (Apr 7, 2021):
I think you can set the PATH to stapler manually in the configuration file. Did you try?
@christo-ph commented on GitHub (Apr 7, 2021):
Thanks to your and @URBANsUNITED post, I found it in the config and the initial error disappears.
The following errors are due to permission problems with the mounted share. I will check this further
@crtvrmn commented on GitHub (Apr 7, 2021):
So i learned a little bit of linux the last few days. i found stapler with
root@c396486f1713:/# find / stapler | grep -e "stapler" 2>dev/null
/usr/local/bin/stapler
/usr/local/bin/pdf-stapler
/usr/local/lib/python3.8/dist-packages/staplelib/stapler.py
/usr/local/lib/python3.8/dist-packages/staplelib/pycache/stapler.cpython-38.pyc
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info/METADATA
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info/INSTALLER
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info/WHEEL
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info/RECORD
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info/LICENSE
/usr/local/lib/python3.8/dist-packages/stapler-1.0.0.dist-info/entry_points.txt
/usr/local/lib/python3.8/dist-packages/mglib/stapler.py
/usr/local/lib/python3.8/dist-packages/mglib/pycache/stapler.cpython-38.pyc
find: ‘/proc/313/map_files’: Permission denied
find: ‘/proc/315/map_files’: Permission denied
find: ‘/proc/337/map_files’: Permission denied
find: ‘/proc/3271/map_files’: Permission denied
find: ‘/proc/3272/map_files’: Permission denied
find: ‘stapler’: No such file or directory
and according to https://www.papermerge.com/docs/Installation/settings.html the default path for stapler in the papermerge.conf.py is expected to be BINARY_STAPLER = "/usr/bin/stapler"
Its kinda clear to me, that i either need to edit the papermerge.conf.py but neither vi, vim or nano do work. what am i missing? im using the docker terminal, i guess there is no vi, vim or nano installed?
@amo13 commented on GitHub (Apr 7, 2021):
a simple
whereis staplerwould have found the binary too ;)I never used any docker or container stuff, but if you can't edit the config file, you should take notice of the error message given to you. Why can't you edit it? No editor like nano installed? Or is nano showing you the file but without permission to edit?
@crtvrmn commented on GitHub (Apr 8, 2021):
this :c
edit
finally it clicked. i just used putty, ran the search for my conf file with the super cool looking 2>/dev/null thingy and finally was able to edit the file with nano as it should be.
i also added in the german OCR, for now ill just have to wait if this worked as i expect it to work :D container is restarting
@crtvrmn commented on GitHub (Apr 8, 2021):
Problem with stapler fixed due to adding the correct path (it got an extra local in there) in the papermerge.conf.py
now i need to fix "DEBUG/ForkPoolWorker-2] Missing page txt /data/media/results/user_1/document_2/pages/page_1.txt." wich seems to be a problem with the DB location, but my initial problem is solved so im closing this one :)
edit (the last one, i swear!): last problem was, i added german lang support in the config file and the linux server package had it not included so i had to run a "apt-get install tesseract-ocr-deu" from the portainer-docker container console and now it seems to work