Code Monkey home page Code Monkey logo

docker-paperless-ng's Introduction

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

DEPRECATION NOTICE

This image is deprecated. We will not offer support for this image and it will not be updated. We recommend switching to the new official container: https://github.com/paperless-ngx/paperless-ngx

linuxserver/paperless-ng

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build LSIO CI

Paperless-ng is an application by Daniel Quinn and contributors that indexes your scanned documents and allows you to easily search for documents and store metadata alongside your documents."

paperless-ng

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/paperless-ng:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf arm32v7-<version tag>

Application Setup

Default login is admin:admin via the webui, accessible at http://SERVERIP:PORT More info at paperless-ng. For convenience this container provides an alias to perform administration management commands. Available administration commands are documented upstream here and can be accessed with this container thus: docker exec -it <container_name> manage <command>. For example, docker exec -it paperless manage document_retagger -tT.

Usage

Here are some example snippets to help you get started creating a container.

docker-compose (recommended, click here for more info)

---
version: "2.1"
services:
  paperless-ng:
    image: lscr.io/linuxserver/paperless-ng:latest
    container_name: paperless-ng
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - REDIS_URL= #optional
    volumes:
      - </path/to/appdata/config>:/config
      - </path/to/appdata/data>:/data
    ports:
      - 8000:8000
    restart: unless-stopped

docker cli (click here for more info)

docker run -d \
  --name=paperless-ng \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/New_York \
  -e REDIS_URL= `#optional` \
  -p 8000:8000 \
  -v </path/to/appdata/config>:/config \
  -v </path/to/appdata/data>:/data \
  --restart unless-stopped \
  lscr.io/linuxserver/paperless-ng:latest

Parameters

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
-p 8000 http gui
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=America/New_York Specify a timezone to use EG America/New_York
-e REDIS_URL= Specify an external redis instance to use. Can optionally include a port (redis:6379) and/or db (redis/foo). If left blank or not included, will use a built-in redis instance. If changed after initial setup will also require manual modification of /config/settings.py
-v /config Contains all relevant configuration files.
-v /data Storage location for all paperless-ng data files.

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__PASSWORD=/run/secrets/mysecretpassword

Will set the environment variable PASSWORD based on the contents of the /run/secrets/mysecretpassword file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running: docker exec -it paperless-ng /bin/bash
  • To monitor the logs of the container in realtime: docker logs -f paperless-ng
  • container version number
    • docker inspect -f '{{ index .Config.Labels "build_version" }}' paperless-ng
  • image version number
    • docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/paperless-ng:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update all images: docker-compose pull
    • or update a single image: docker-compose pull paperless-ng
  • Let compose update all containers as necessary: docker-compose up -d
    • or update a single container: docker-compose up -d paperless-ng
  • You can also remove the old dangling images: docker image prune

Via Docker Run

  • Update the image: docker pull lscr.io/linuxserver/paperless-ng:latest
  • Stop the running container: docker stop paperless-ng
  • Delete the container: docker rm paperless-ng
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)
  • You can also remove the old dangling images: docker image prune

Via Watchtower auto-updater (only use if you don't remember the original parameters)

  • Pull the latest image at its tag and replace it with the same env variables in one run:

    docker run --rm \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower \
    --run-once paperless-ng
  • You can also remove the old dangling images: docker image prune

Note: We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.

Image Update Notifications - Diun (Docker Image Update Notifier)

  • We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-paperless-ng.git
cd docker-paperless-ng
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/paperless-ng:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 05.09.22: - Deprecate.
  • 30.11.21: - Added in jbig2enc.
  • 07.10.21: - Fixed variable that determins if we should run redis locally.
  • 01.10.21: - Replaced uwsgi with gunicorn due to websocket issues.
  • 24.07.21: - Fixed directory config files (sqlite db) is all stored.
  • 23.07.21: - Fixed initial user creation.
  • 10.07.21: - Initial Release.

docker-paperless-ng's People

Contributors

alex-phillips avatar aptalca avatar ironicbadger avatar j0nnymoe avatar roxedus avatar thespad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-paperless-ng's Issues

support for german, italian, spanish and french language

linuxserver.io


Desired Behavior

Add the default languages paperless-ng is referring to in its own documentation. See https://paperless-ng.readthedocs.io/en/latest/configuration.html#docker-specific-options in the section PAPERLESS_OCR_LANGUAGES

Snipped from the doc:
Additional OCR languages to install. By default, paperless comes with English, German, Italian, Spanish and French.

Current Behavior

Sadly only english language is supported.

Alternatives Considered

Alternatively, support the PAPERLESS_OCR_LANGUAGES config to be respected, through which additional language packs can be installed.

Install additional tesseract-ocr-* packages

linuxserver.io


Desired Behavior

Analog to the official container, install additional OCR languages and add possibility to configure paperless to use them:
tesseract-ocr-deu
tesseract-ocr-fra
tesseract-ocr-ita
tesseract-ocr-spa
Env var used in official container: PAPERLESS_OCR_LANGUAGE

Current Behavior

Only tesseract-ocr-eng is installed and supported.

Alternatives Considered

Use official image which was not updated for a long time...

Other OCR language support doesn't work?

linuxserver.io


Expected Behavior

I'm using a Synology NAS Plus-series with Docker.

Use other OCR languages doesn't seem to work.

In the Docs for Paperless-ng (https://paperless-ng.readthedocs.io/en/latest/configuration.html?highlight=docker%20ocr#docker-specific-options) there is instructions for installation of more OCR language support. I have followed the guide and used this config:

PAPERLESS_OCR_LANGUAGES=swe
PAPERLESS_OCR_LANGUAGE=swe

The expected behavior is that OCR for Swedish installs and get used.

Current Behavior

I get error in my logs. The application doesn't consume any documents.

Steps to Reproduce

Use this variables in config enviroment:
PAPERLESS_OCR_LANGUAGES=swe
PAPERLESS_OCR_LANGUAGE=swe

Environment

OS: DSM 7
**CPU architecture: arm64
How docker service was installed:
Via Synology Package Center - Docker

Command used to create docker container (run/create/compose/screenshot)

docker run -d --name=paperless-ng
-p 8931:8000
-e PUID=XXXX
-e PGID=XXXX
-e TZ=Europe/Stockholm
-v /volume1/docker/paperless/config:/config
-v /volume1/docker/paperless/data:/data
--restart always
ghcr.io/linuxserver/paperless-ng

Docker logs

2021-09-21 13:24:47,stderr,[uwsgi-daemons] respawning "/usr/bin/python3 /app/paperless/src/manage.py document_consumer" (uid: 1026 gid: 100) 2021-09-21 13:24:47,stderr,[uwsgi-daemons] respawning "/usr/bin/python3 /app/paperless/src/manage.py qcluster" (uid: 1026 gid: 100) 2021-09-21 13:24:46,stderr,[uwsgi-daemons] throttling "/usr/bin/python3 /app/paperless/src/manage.py document_consumer" for 1 seconds 2021-09-21 13:24:46,stderr,[uwsgi-daemons] throttling "/usr/bin/python3 /app/paperless/src/manage.py qcluster" for 1 seconds 2021-09-21 13:24:45,stderr,?: The selected ocr language swe is not installed. Paperless cannot OCR your documents without it. Please fix PAPERLESS_OCR_LANGUAGE. 2021-09-21 13:24:45,stderr,ERRORS: 2021-09-21 13:24:45,stderr, 2021-09-21 13:24:45,stderr,SystemCheckError: System check identified some issues: 2021-09-21 13:24:45,stderr,?: The selected ocr language swe is not installed. Paperless cannot OCR your documents without it. Please fix PAPERLESS_OCR_LANGUAGE. 2021-09-21 13:24:45,stderr,ERRORS: 2021-09-21 13:24:45,stderr, 2021-09-21 13:24:45,stderr,SystemCheckError: System check identified some issues: 2021-09-21 13:24:44,stderr,[uwsgi-daemons] spawning "/usr/bin/python3 /app/paperless/src/manage.py qcluster" (uid: 1026 gid: 100) 2021-09-21 13:24:44,stderr,[uwsgi-daemons] spawning "/usr/bin/python3 /app/paperless/src/manage.py document_consumer" (uid: 1026 gid: 100) 2021-09-21 13:24:44,stderr,"spawned uWSGI worker 1 (pid: 1196, cores: 1) 2021-09-21 13:24:43,stdout,"0 static files copied to '/app/paperless/static', 409 unmodified. 2021-09-21 13:24:42,stderr,*** Operational MODE: single process *** 2021-09-21 13:24:42,stderr,mapped 145840 bytes (142 KB) for 1 cores 2021-09-21 13:24:42,stderr,your mercy for graceful operations on workers is 60 seconds 2021-09-21 13:24:42,stderr,your server socket listen backlog is limited to 100 connections 2021-09-21 13:24:42,stderr,python threads support enabled 2021-09-21 13:24:42,stderr,Python main interpreter initialized at 0x56000b0abf20 2021-09-21 13:24:42,stderr,"Python version: 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] 2021-09-21 13:24:39,stderr,...brutally killing workers... 2021-09-21 13:24:39,stderr,[uwsgi-daemons] stopping daemon (pid: 1146): /usr/bin/python3 /app/paperless/src/manage.py qcluster 2021-09-21 13:24:39,stderr,[uwsgi-daemons] stopping daemon (pid: 1163): /usr/bin/python3 /app/paperless/src/manage.py document_consumer 2021-09-21 13:24:39,stderr,[uwsgi-daemons] stopping daemon (pid: 1164): /usr/bin/python3 /app/paperless/src/manage.py qcluster 2021-09-21 13:24:38,stdout,"320:M 21 Sep 2021 15:24:38.021 # Redis is now ready to exit, bye bye... 2021-09-21 13:24:37,stderr,...brutally killing workers... 2021-09-21 13:24:37,stderr,[uwsgi-daemons] stopping daemon (pid: 1146): /usr/bin/python3 /app/paperless/src/manage.py qcluster 2021-09-21 13:24:37,stderr,[uwsgi-daemons] stopping daemon (pid: 1145): /usr/bin/python3 /app/paperless/src/manage.py document_consumer 2021-09-21 13:24:37,stderr,[uwsgi-daemons] stopping daemon (pid: 1163): /usr/bin/python3 /app/paperless/src/manage.py document_consumer 2021-09-21 13:24:37,stdout,320:signal-handler (1632230677) Received SIGTERM scheduling shutdown... 2021-09-21 13:24:32,stderr,[uwsgi-daemons] throttling "/usr/bin/python3 /app/paperless/src/manage.py document_consumer" for 43 seconds 2021-09-21 13:24:32,stderr,[uwsgi-daemons] throttling "/usr/bin/python3 /app/paperless/src/manage.py qcluster" for 43 seconds 2021-09-21 13:24:31,stderr,?: The selected ocr language swe is not installed. Paperless cannot OCR your documents without it. Please fix PAPERLESS_OCR_LANGUAGE. 2021-09-21 13:24:31,stderr,ERRORS: 2021-09-21 13:24:31,stderr, 2021-09-21 13:24:31,stderr,SystemCheckError: System check identified some issues: 2021-09-21 13:24:31,stderr,?: The selected ocr language swe is not installed. Paperless cannot OCR your documents without it. Please fix PAPERLESS_OCR_LANGUAGE.

Websocket connection failing

linuxserver.io


Expected Behavior

Paperless-ng uses a websocket connection for live upload/ingest updates. The frontend should successfully connect to the container's websocket server.

Current Behavior

The frontend fails to connect to the container's websocket server. From what I can tell, the container produces HTTP response code 200 for wss://paperless-ng.domain.com/ws/status/ (as well as wss://192.168.2.249:8000/ws/status/), where it should produce HTTP 101 Switching Protocols.

Steps to Reproduce

  1. Start paperless-ng container
  2. Log in to frontend
  3. Observe websocket error in browser dev tools, or upload a document and see no updates without refreshing the page

Environment

OS: Ubuntu 20.04.2 LTS
CPU architecture: x86_64
How docker service was installed: Official docker repo

Command used to create docker container (run/create/compose/screenshot)

paperless-ng:
    image: ghcr.io/linuxserver/paperless-ng
    container_name: paperless-ng
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
      - REDIS_URL= #optional
    volumes:
      - <redacted>/paperless-ng/config:/config
      - /misc/documents:/data
    ports:
      - 8000:8000
    restart: unless-stopped

Docker logs

Full logs
paperless-ng           | 2021-08-10T01:15:23.204620310Z -------------------------------------
paperless-ng           | 2021-08-10T01:15:23.204628536Z           _         ()
paperless-ng           | 2021-08-10T01:15:23.204635973Z          | |  ___   _    __
paperless-ng           | 2021-08-10T01:15:23.204651569Z          | | / __| | |  /  \
paperless-ng           | 2021-08-10T01:15:23.204658706Z          | | \__ \ | | | () |
paperless-ng           | 2021-08-10T01:15:23.204665759Z          |_| |___/ |_|  \__/
paperless-ng           | 2021-08-10T01:15:23.204672744Z
paperless-ng           | 2021-08-10T01:15:23.204739340Z
paperless-ng           | 2021-08-10T01:15:23.204750095Z Brought to you by linuxserver.io
paperless-ng           | 2021-08-10T01:15:23.204757547Z -------------------------------------
paperless-ng           | 2021-08-10T01:15:23.205091195Z
paperless-ng           | 2021-08-10T01:15:23.205103869Z To support LSIO projects visit:
paperless-ng           | 2021-08-10T01:15:23.205111267Z https://www.linuxserver.io/donate/
paperless-ng           | 2021-08-10T01:15:23.205118301Z -------------------------------------
paperless-ng           | 2021-08-10T01:15:23.205138554Z GID/UID
paperless-ng           | 2021-08-10T01:15:23.205146254Z -------------------------------------
paperless-ng           | 2021-08-10T01:15:23.209438917Z
paperless-ng           | 2021-08-10T01:15:23.209462034Z User uid:    1000
paperless-ng           | 2021-08-10T01:15:23.209469929Z User gid:    1000
paperless-ng           | 2021-08-10T01:15:23.209476948Z -------------------------------------
paperless-ng           | 2021-08-10T01:15:23.209484077Z
paperless-ng           | 2021-08-10T01:15:23.217753345Z [cont-init.d] 10-adduser: exited 0.
paperless-ng           | 2021-08-10T01:15:23.219084538Z [cont-init.d] 50-config: executing...
paperless-ng           | 2021-08-10T01:15:25.001517708Z Operations to perform:
paperless-ng           | 2021-08-10T01:15:25.001564082Z   Apply all migrations: admin, auth, authtoken, contenttypes, django_q, documents, paperless_mail, sessions
paperless-ng           | 2021-08-10T01:15:25.001573344Z Running migrations:
paperless-ng           | 2021-08-10T01:15:25.001580752Z   No migrations to apply.
paperless-ng           | 2021-08-10T01:15:25.873877509Z [cont-init.d] 50-config: exited 0.
paperless-ng           | 2021-08-10T01:15:25.876560109Z [cont-init.d] 90-custom-folders: executing...
paperless-ng           | 2021-08-10T01:15:25.886345083Z [cont-init.d] 90-custom-folders: exited 0.
paperless-ng           | 2021-08-10T01:15:25.887998904Z [cont-init.d] 99-custom-scripts: executing...
paperless-ng           | 2021-08-10T01:15:25.899803834Z [custom-init] no custom files found exiting...
paperless-ng           | 2021-08-10T01:15:25.900551736Z [cont-init.d] 99-custom-scripts: exited 0.
paperless-ng           | 2021-08-10T01:15:25.901380619Z [cont-init.d] done.
paperless-ng           | 2021-08-10T01:15:25.902424578Z [services.d] starting services
paperless-ng           | 2021-08-10T01:15:25.911343300Z [services.d] done.
paperless-ng           | 2021-08-10T01:15:25.914187731Z Waiting for redis to become available...
paperless-ng           | 2021-08-10T01:15:25.924579653Z 309:C 09 Aug 2021 21:15:25.924 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
paperless-ng           | 2021-08-10T01:15:25.924624949Z 309:C 09 Aug 2021 21:15:25.924 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=309, just started
paperless-ng           | 2021-08-10T01:15:25.924648569Z 309:C 09 Aug 2021 21:15:25.924 # Configuration loaded
paperless-ng           | 2021-08-10T01:15:25.931457218Z 309:M 09 Aug 2021 21:15:25.931 * Running mode=standalone, port=6379.
paperless-ng           | 2021-08-10T01:15:25.931515620Z 309:M 09 Aug 2021 21:15:25.931 # Server initialized
paperless-ng           | 2021-08-10T01:15:25.931530041Z 309:M 09 Aug 2021 21:15:25.931 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
paperless-ng           | 2021-08-10T01:15:25.931540709Z 309:M 09 Aug 2021 21:15:25.931 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
paperless-ng           | 2021-08-10T01:15:25.931739450Z 309:M 09 Aug 2021 21:15:25.931 * Ready to accept connections
paperless-ng           | 2021-08-10T01:15:35.922624555Z [uWSGI] getting INI configuration from uwsgi.ini
paperless-ng           | 2021-08-10T01:15:35.929284485Z [uwsgi-static] added mapping for /static => /app/paperless/static
paperless-ng           | 2021-08-10T01:15:35.929361731Z *** Starting uWSGI 2.0.18-debian (64bit) on [Mon Aug  9 21:15:35 2021] ***
paperless-ng           | 2021-08-10T01:15:35.929470867Z compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55
paperless-ng           | 2021-08-10T01:15:35.929489679Z os: Linux-5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021
paperless-ng           | 2021-08-10T01:15:35.929499411Z nodename: 6b4972aefe5c
paperless-ng           | 2021-08-10T01:15:35.929507641Z machine: x86_64
paperless-ng           | 2021-08-10T01:15:35.929515476Z clock source: unix
paperless-ng           | 2021-08-10T01:15:35.929523321Z pcre jit disabled
paperless-ng           | 2021-08-10T01:15:35.929531210Z detected number of CPU cores: 4
paperless-ng           | 2021-08-10T01:15:35.929539095Z current working directory: /app/paperless/src
paperless-ng           | 2021-08-10T01:15:35.929546858Z detected binary path: /usr/bin/uwsgi-core
paperless-ng           | 2021-08-10T01:15:35.929554652Z your memory page size is 4096 bytes
paperless-ng           | 2021-08-10T01:15:35.929562414Z detected max file descriptor number: 1048576
paperless-ng           | 2021-08-10T01:15:35.930904914Z building mime-types dictionary from file /etc/mime.types...567 entry found
paperless-ng           | 2021-08-10T01:15:35.930948737Z lock engine: pthread robust mutexes
paperless-ng           | 2021-08-10T01:15:35.931779472Z thunder lock: disabled (you can enable it with --thunder-lock)
paperless-ng           | 2021-08-10T01:15:35.931986328Z uwsgi socket 0 bound to TCP address :8000 fd 3
paperless-ng           | 2021-08-10T01:15:35.932463831Z Python version: 3.8.10 (default, Jun  2 2021, 10:49:15)  [GCC 9.4.0]
paperless-ng           | 2021-08-10T01:15:35.954795452Z Python main interpreter initialized at 0x55a5c8f03360
paperless-ng           | 2021-08-10T01:15:35.954850574Z python threads support enabled
paperless-ng           | 2021-08-10T01:15:35.954867111Z your server socket listen backlog is limited to 100 connections
paperless-ng           | 2021-08-10T01:15:35.954878212Z your mercy for graceful operations on workers is 60 seconds
paperless-ng           | 2021-08-10T01:15:35.954947569Z mapped 145840 bytes (142 KB) for 1 cores
paperless-ng           | 2021-08-10T01:15:35.955018567Z *** Operational MODE: single process ***
paperless-ng           | 2021-08-10T01:15:35.955339334Z running "exec:/usr/bin/python3 /app/paperless/src/manage.py collectstatic --noinput" (pre app)...
paperless-ng           | 2021-08-10T01:15:36.546383762Z
paperless-ng           | 2021-08-10T01:15:36.546437785Z 0 static files copied to '/app/paperless/static', 392 unmodified.
paperless-ng           | 2021-08-10T01:15:36.646187394Z running "exec:/usr/bin/python3 /app/paperless/src/manage.py compilemessages" (pre app)...
paperless-ng           | 2021-08-10T01:15:37.170250636Z File “/app/paperless/src/locale/de_DE/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170298802Z File “/app/paperless/src/locale/hu_HU/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170310506Z File “/app/paperless/src/locale/th_TH/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170319507Z File “/app/paperless/src/locale/pt_BR/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170345304Z File “/app/paperless/src/locale/zh_CN/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170354518Z File “/app/paperless/src/locale/pl_PL/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170363291Z File “/app/paperless/src/locale/cs_CZ/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170371712Z File “/app/paperless/src/locale/fr_FR/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170379901Z File “/app/paperless/src/locale/it_IT/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170388237Z File “/app/paperless/src/locale/la_LA/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170396540Z File “/app/paperless/src/locale/xh_ZA/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170404999Z File “/app/paperless/src/locale/nl_NL/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170413207Z File “/app/paperless/src/locale/ro_RO/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170421530Z File “/app/paperless/src/locale/es_ES/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170429932Z File “/app/paperless/src/locale/ru_RU/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170446695Z File “/app/paperless/src/locale/pt_PT/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170454816Z File “/app/paperless/src/locale/sv_SE/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170462821Z File “/app/paperless/src/locale/en_GB/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.170470875Z File “/app/paperless/src/locale/en_US/LC_MESSAGES/django.po” is already compiled and up to date.
paperless-ng           | 2021-08-10T01:15:37.907010633Z WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x55a5c8f03360 pid: 310 (default app)
paperless-ng           | 2021-08-10T01:15:37.907064109Z *** uWSGI is running in multiple interpreter mode ***
paperless-ng           | 2021-08-10T01:15:37.907076641Z spawned uWSGI master process (pid: 310)
paperless-ng           | 2021-08-10T01:15:37.908473675Z spawned uWSGI worker 1 (pid: 344, cores: 1)
paperless-ng           | 2021-08-10T01:15:38.268469126Z [pid: 344|app: 0|req: 1/1] 192.168.2.226 () {40 vars in 1494 bytes} [Tue Aug 10 01:15:37 2021] GET /documents => generated 928 bytes in 358 msecs (HTTP/1.1 200) 9 headers in 272 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.321327927Z [pid: 344|app: -1|req: -1/2] 192.168.2.226 () {38 vars in 1366 bytes} [Tue Aug 10 01:15:38 2021] GET /static/frontend/en-US/styles.css => generated 173463 bytes in 5 msecs via sendfile() (HTTP/1.1 200) 3 headers in 113 bytes (2 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.321737014Z [pid: 344|app: -1|req: -1/3] 192.168.2.226 () {38 vars in 1351 bytes} [Tue Aug 10 01:15:38 2021] GET /static/frontend/en-US/runtime.js => generated 1485 bytes in 0 msecs via sendfile() (HTTP/1.1 200) 3 headers in 125 bytes (0 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.359129792Z [pid: 344|app: -1|req: -1/4] 192.168.2.226 () {38 vars in 1355 bytes} [Tue Aug 10 01:15:38 2021] GET /static/frontend/en-US/polyfills.js => generated 36877 bytes in 1 msecs via sendfile() (HTTP/1.1 200) 3 headers in 126 bytes (0 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.412420003Z [pid: 344|app: -1|req: -1/5] 192.168.2.226 () {38 vars in 1345 bytes} [Tue Aug 10 01:15:38 2021] GET /static/frontend/en-US/main.js => generated 1118733 bytes in 53 msecs via sendfile() (HTTP/1.1 200) 3 headers in 128 bytes (9 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.565555002Z [uwsgi-daemons] spawning "/usr/bin/python3 /app/paperless/src/manage.py qcluster" (uid: 1000 gid: 1000)
paperless-ng           | 2021-08-10T01:15:38.592141099Z [uwsgi-daemons] spawning "/usr/bin/python3 /app/paperless/src/manage.py document_consumer" (uid: 1000 gid: 1000)
paperless-ng           | 2021-08-10T01:15:38.599092089Z [pid: 344|app: 0|req: 2/6] 192.168.2.226 () {44 vars in 1457 bytes} [Tue Aug 10 01:15:38 2021] GET /ws/status/ => generated 928 bytes in 11 msecs (HTTP/1.1 200) 9 headers in 272 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.645267313Z [pid: 344|app: 0|req: 3/7] 192.168.2.226 () {40 vars in 1474 bytes} [Tue Aug 10 01:15:38 2021] GET /api/saved_views/?page=1&page_size=100000 => generated 52 bytes in 12 msecs (HTTP/1.1 200) 10 headers in 304 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.655245541Z [pid: 344|app: 0|req: 4/8] 192.168.2.226 () {38 vars in 1400 bytes} [Tue Aug 10 01:15:38 2021] GET /assets/bootstrap-icons.svg => generated 0 bytes in 5 msecs (HTTP/1.1 302) 10 headers in 334 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.809646548Z [pid: 344|app: 0|req: 5/9] 192.168.2.226 () {40 vars in 1498 bytes} [Tue Aug 10 01:15:38 2021] GET /api/documents/?page=1&page_size=50&ordering=-created => generated 20771 bytes in 62 msecs (HTTP/1.1 200) 10 headers in 301 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.822551515Z [pid: 344|app: 0|req: 6/10] 192.168.2.226 () {40 vars in 1460 bytes} [Tue Aug 10 01:15:38 2021] GET /api/tags/?page=1&page_size=100000 => generated 598 bytes in 11 msecs (HTTP/1.1 200) 10 headers in 305 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.834040647Z [pid: 344|app: 0|req: 7/11] 192.168.2.226 () {40 vars in 1480 bytes} [Tue Aug 10 01:15:38 2021] GET /api/correspondents/?page=1&page_size=100000 => generated 847 bytes in 11 msecs (HTTP/1.1 200) 10 headers in 305 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.844740931Z [pid: 344|app: 0|req: 8/12] 192.168.2.226 () {40 vars in 1480 bytes} [Tue Aug 10 01:15:38 2021] GET /api/document_types/?page=1&page_size=100000 => generated 619 bytes in 10 msecs (HTTP/1.1 200) 10 headers in 305 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:38.879773477Z [pid: 344|app: -1|req: -1/13] 192.168.2.226 () {38 vars in 1444 bytes} [Tue Aug 10 01:15:38 2021] GET /static/frontend/en-US/assets/bootstrap-icons.svg => generated 592579 bytes in 20 msecs via sendfile() (HTTP/1.1 200) 3 headers in 118 bytes (8 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.032436863Z [pid: 344|app: 0|req: 9/14] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:38 2021] GET /api/documents/7/thumb/ => generated 1107184 bytes in 39 msecs (HTTP/1.1 200) 11 headers in 344 bytes (11 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.051638207Z [pid: 344|app: 0|req: 10/15] 192.168.2.226 () {38 vars in 1394 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/10/thumb/ => generated 207692 bytes in 19 msecs (HTTP/1.1 200) 11 headers in 343 bytes (2 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.091076810Z [pid: 344|app: 0|req: 11/16] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/5/thumb/ => generated 1055757 bytes in 39 msecs (HTTP/1.1 200) 11 headers in 344 bytes (10 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.143969582Z [pid: 344|app: 0|req: 12/17] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/9/thumb/ => generated 1094836 bytes in 52 msecs (HTTP/1.1 200) 11 headers in 344 bytes (14 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.152499202Z [pid: 344|app: 0|req: 13/18] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/1/thumb/ => generated 37179 bytes in 8 msecs (HTTP/1.1 200) 11 headers in 342 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.193674113Z [pid: 344|app: 0|req: 14/19] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/6/thumb/ => generated 1191339 bytes in 41 msecs (HTTP/1.1 200) 11 headers in 344 bytes (11 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.315378044Z [pid: 344|app: 0|req: 15/20] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/3/thumb/ => generated 1147278 bytes in 120 msecs (HTTP/1.1 200) 11 headers in 344 bytes (13 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.331340695Z [pid: 344|app: 0|req: 16/21] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/2/thumb/ => generated 57496 bytes in 14 msecs (HTTP/1.1 200) 11 headers in 342 bytes (1 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.420875902Z [pid: 344|app: 0|req: 17/22] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/8/thumb/ => generated 1076103 bytes in 88 msecs (HTTP/1.1 200) 11 headers in 344 bytes (10 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.522203569Z [pid: 344|app: 0|req: 18/23] 192.168.2.226 () {38 vars in 1392 bytes} [Tue Aug 10 01:15:39 2021] GET /api/documents/4/thumb/ => generated 1093136 bytes in 100 msecs (HTTP/1.1 200) 11 headers in 344 bytes (12 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.570361162Z [pid: 344|app: 0|req: 19/24] 192.168.2.226 () {38 vars in 1370 bytes} [Tue Aug 10 01:15:39 2021] GET /favicon.ico => generated 111014 bytes in 10 msecs (HTTP/1.1 200) 9 headers in 263 bytes (2 switches on core 0)
paperless-ng           | 2021-08-10T01:15:39.705290401Z 01:15:39 [Q] INFO Q Cluster social-oxygen-twenty-illinois starting.
paperless-ng           | 2021-08-10T01:15:39.708081763Z [2021-08-10 01:15:39,706] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /data/consume
paperless-ng           | 2021-08-10T01:15:39.730585845Z 01:15:39 [Q] INFO Process-1:1 ready for work at 369
paperless-ng           | 2021-08-10T01:15:39.738144182Z 01:15:39 [Q] INFO Process-1:2 ready for work at 370
paperless-ng           | 2021-08-10T01:15:39.741702678Z 01:15:39 [Q] INFO Process-1 guarding cluster social-oxygen-twenty-illinois
paperless-ng           | 2021-08-10T01:15:39.743418469Z 01:15:39 [Q] INFO Process-1:3 monitoring at 371
paperless-ng           | 2021-08-10T01:15:39.743468984Z 01:15:39 [Q] INFO Process-1:4 pushing tasks at 372
paperless-ng           | 2021-08-10T01:15:39.745588104Z 01:15:39 [Q] INFO Q Cluster social-oxygen-twenty-illinois running.

UID/GID Mapping Not Always Working

linuxserver.io

When running the container with PUID and PGID set, created document folders are sometimes owned by root, instead of the paperless user.


Expected Behavior

All folders created by the container are owned by the user as mapped in the compose file.

Current Behavior

Sometimes folders are owned by root. For example, inside my "originals" folder:

total 26K
 18K drwxr-xr-x 9 paperless paperless 9 Jan  4 11:34  ./
1.0K drwxr-xr-x 5 paperless paperless 5 Jan  2 12:47  ../
1.0K drwxr-xr-x 4 root      root      4 Jan  4 10:18 'correspondent x'/
1.0K drwxr-xr-x 3 paperless paperless 3 Jan  4 10:20 'correspondent x'/
1.0K drwxr-xr-x 3 root      root      3 Jan  4 10:18 'correspondent x'/
1.0K drwxr-xr-x 4 root      root      4 Jan  4 10:18  none/
1.0K drwxr-xr-x 4 root      root      4 Jan  4 10:18 'correspondent x'/
1.0K drwxr-xr-x 3 paperless paperless 3 Jan  4 11:01 'correspondent x'/
1.0K drwxr-xr-x 4 paperless paperless 4 Jan  4 11:41 'correspondent x'/

You can see the folders are created in a mix of paperless (the mapped user) and root. This was the same container, it hasn't been started or stopped.

Steps to Reproduce

I'm running paperless with PAPERLESS_FILENAME_FORMAT = {correspondent}/{created_year}/{title}. That could be related, as it defines the format and file structure of the folders?

Environment

OS: Ubuntu 20.04
CPU architecture: x86_64
How docker service was installed: Official and up to date from the docker apt.

Command used to create docker container (run/create/compose/screenshot)

compose file

version: "3"
networks:
  paperless-net:
    name: "paperless-net"
    external: true
services:
  paperless:
    container_name: "paperless"
    image: "lscr.io/linuxserver/paperless-ng:latest"
    networks:
      - "paperless-net"
    restart: "unless-stopped"
    security_opt:
      - "no-new-privileges=true"
    environment:
      TZ: "America/Los_Angeles"
      PAPERLESS_TIME_ZONE: "America/Los_Angeles"
      PUID: "970"
      PGID: "969"
      PAPERLESS_FILENAME_FORMAT: "{correspondent}/{created_year}/{title}"
    volumes:
      - "/tank/config/utils/paperless:/config"
      - "/tank/backup/paperless:/data"
      - "/tank/backup/paperless/backup:/backup"
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    ports:
      - "8800:8000"

Docker logs

Logs

11:52:14 [Q] INFO Process-1:34 processing [some document.pdf]
[2022-01-04 11:52:14,999] [INFO] [paperless.consumer] Consuming some document.pdf
/usr/local/lib/python3.8/dist-packages/pikepdf/models/metadata.py:373: UserWarning: The metadata field /CreationDate could not be copied to XMP
  warn(msg)
[2022-01-04 11:52:26,613] [ERROR] [paperless.consumer] The following error occured while consuming some document.pdf: [Errno 13] Permission denied: '/data/media/documents/originals/none/2021/some document.pdf'
Traceback (most recent call last):
  File "/app/paperless/src/documents/consumer.py", line 309, in try_consume_file
    self._write(document.storage_type,
  File "/app/paperless/src/documents/consumer.py", line 413, in _write
    with open(target, "wb") as write_file:
PermissionError: [Errno 13] Permission denied: '/data/media/documents/originals/none/2021/some document.pdf'
11:52:26 [Q] INFO Process-1:34 stopped doing work
11:52:26 [Q] ERROR Failed [some document.pdf] - some document.pdf: The following error occured while consuming some document.pdf: [Errno 13] Permission denied: '/data/media/documents/originals/none/2021/some document.pdf' : Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/asgiref/sync.py", line 288, in main_wrap
    raise exc_info[1]
  File "/app/paperless/src/documents/consumer.py", line 309, in try_consume_file
    self._write(document.storage_type,
  File "/app/paperless/src/documents/consumer.py", line 413, in _write
    with open(target, "wb") as write_file:
PermissionError: [Errno 13] Permission denied: '/data/media/documents/originals/none/2021/some document.pdf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/django_q/cluster.py", line 432, in worker
    res = f(*task["args"], **task["kwargs"])
  File "/app/paperless/src/documents/tasks.py", line 74, in consume_file
    document = Consumer().try_consume_file(
  File "/app/paperless/src/documents/consumer.py", line 346, in try_consume_file
    self._fail(
  File "/app/paperless/src/documents/consumer.py", line 70, in _fail
    raise ConsumerError(f"{self.filename}: {log_message or message}")
documents.consumer.ConsumerError: some document.pdf: The following error occured while consuming some document.pdf: [Errno 13] Permission denied: '/data/media/documents/originals/none/2021/some document.pdf'

specifying external redis does not work

linuxserver.io


Expected Behavior

Setting REDIS_URL=redis://myredis should connect to my external redis instance and boot the app successfully.

Current Behavior

The applications try to connect to redis://localhost:6379 and fail.

Steps to Reproduce

docker network create redis-test
docker run --name myredis --net redis-test -d redis
docker run -it --rm -e 'REDIS_URL=redis://myredis' --net redis-test linuxserver/paperless-ng

Environment

OS: flatcar linux
CPU architecture: x86_64
How docker service was installed: native

Command used to create docker container (run/create/compose/screenshot)

Docker logs

19:46:19 [Q] ERROR Can not connect to Redis server.
Process Process-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/redis/connection.py", line 559, in connect
    sock = self._connect()
  File "/usr/local/lib/python3.8/dist-packages/redis/connection.py", line 615, in _connect
    raise err
  File "/usr/local/lib/python3.8/dist-packages/redis/connection.py", line 603, in _connect
    sock.connect(socket_address)
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/django_q/cluster.py", line 168, in __init__
    self.start()
  File "/usr/local/lib/python3.8/dist-packages/django_q/cluster.py", line 171, in start
    self.broker.ping()
  File "/usr/local/lib/python3.8/dist-packages/django_q/brokers/redis_broker.py", line 39, in ping
    raise e
  File "/usr/local/lib/python3.8/dist-packages/django_q/brokers/redis_broker.py", line 36, in ping
    return self.connection.ping()
  File "/usr/local/lib/python3.8/dist-packages/redis/client.py", line 1378, in ping
    return self.execute_command('PING')
  File "/usr/local/lib/python3.8/dist-packages/redis/client.py", line 898, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "/usr/local/lib/python3.8/dist-packages/redis/connection.py", line 1192, in get_connection
    connection.connect()
  File "/usr/local/lib/python3.8/dist-packages/redis/connection.py", line 563, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address.

ImportError: pikepdf's extension library failed to import

linuxserver.io


Expected Behavior

Uploading a document into the paperless-ng web application should trigger an OCR process and the file should be available afterwards.

Current Behavior

The upload process stops at 'Upload complete, waiting...' and nothing happens. The web application itself is fully functional, also the Django admin backend. Just the upload process seems not to work at all.

Steps to Reproduce

  1. Log into the paperless-ng web application
  2. Upload a sample pdf file using the "drop documents here" or "browse file" button
  3. Observe that the file is not successfully uploaded or processed

Environment

OS:
Debian GNU/Linux 9 (stretch) - Raspberry Pi 4

CPU architecture:
arm32

How docker service was installed:
Via portainer, official repo from DockerHub

Docker logs

19:28:16 [Q] INFO recycled worker Process-1:1
19:28:16 [Q] INFO Process-1:5 ready for work at 381
19:28:19 [Q] INFO Enqueued 1
19:28:19 [Q] INFO Process-1:2 processing [example.pdf]
[pid: 347|app: 0|req: 7/7] 192.168.178.7 () {42 vars in 1669 bytes} [Fri Aug 27 19:28:19 2021] POST /api/documents/post_document/ => generated 4 bytes in 33 msecs (HTTP/1.1 200) 10 headers in 292 bytes (2 switches on core 0)
[2021-08-27 19:28:19,256] [INFO] [paperless.consumer] Consuming example.pdf
19:28:19 [Q] INFO Process-1:2 stopped doing work
19:28:19 [Q] ERROR Failed [example.pdf] - pikepdf's extension library failed to import : Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pikepdf/__init__.py", line 13, in <module>
    from . import _qpdf
ImportError: /usr/local/lib/python3.8/dist-packages/pikepdf/_qpdf.cpython-38-arm-linux-gnueabihf.so: undefined symbol: _ZN20QPDFPageObjectHelper16placeFormXObjectE16QPDFObjectHandleRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9RectangleEbbb
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/django_q/cluster.py", line 432, in worker
    res = f(*task["args"], **task["kwargs"])
  File "/app/paperless/src/documents/tasks.py", line 74, in consume_file
    document = Consumer().try_consume_file(
  File "/app/paperless/src/documents/consumer.py", line 248, in try_consume_file
    document_parser.parse(self.path, mime_type, self.filename)
  File "/app/paperless/src/paperless_tesseract/parsers.py", line 230, in parse
    import ocrmypdf
  File "/usr/local/lib/python3.8/dist-packages/ocrmypdf/__init__.py", line 10, in <module>
    from ocrmypdf import helpers, hocrtransform, leptonica, pdfa, pdfinfo
  File "/usr/local/lib/python3.8/dist-packages/ocrmypdf/helpers.py", line 22, in <module>
    import pikepdf
  File "/usr/local/lib/python3.8/dist-packages/pikepdf/__init__.py", line 16, in <module>
    raise ImportError(_msg) from _e
ImportError: pikepdf's extension library failed to import

pikepdf's extension library failed to import

linuxserver.io


Expected Behavior

Documents should get "consumed" as expected

Current Behavior

Paperless-ng displays that it is currently processing all those files (if I put in 28, it counts 28), but then nothing appears in my documents.

Steps to Reproduce

  1. Put PDFs in /data/consume
  2. Restart Paperless-ng. Paperless-ng says it is processing the PDFs.
  3. No documents appear. Document count is 0.

Environment

OS:
CPU architecture: x86_64/arm32/arm64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

---
version: "2.1"
services:
  davos:
    image: lscr.io/linuxserver/paperless-ng
    container_name: paperless-ng
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
    volumes:
      - /Users/username/Docker/paperless-ng/config:/config
      - /Users/username/Docker/paperless-ng/data/media:/data/media
      - /Users/username/Docker/paperless-ng/data/consume:/data/consume
      - /Users/Shared/Documents/Papers-OUT:/data/export
    ports:
      - 8100:8000
    restart: unless-stopped
networks:
  default:
    external: true
    name: lsio

Docker logs

today at 7:12:39 PM02:12:39 [Q] INFO recycled worker Process-1:12
today at 7:12:39 PM02:12:39 [Q] INFO Process-1:16 ready for work at 520
today at 7:12:39 PM02:12:39 [Q] INFO Process-1:16 processing [name-of-the-document.pdf]
today at 7:12:39 PM[2022-04-28 02:12:39,631] [INFO] [paperless.consumer] Consuming name-of-the-document.pdf
today at 7:12:39 PM02:12:39 [Q] INFO Process-1:15 stopped doing work
today at 7:12:40 PM02:12:40 [Q] INFO recycled worker Process-1:15
today at 7:12:40 PM02:12:40 [Q] INFO Process-1:17 ready for work at 528
today at 7:12:40 PM02:12:40 [Q] INFO Process-1:17 processing [name-of-the-2nd-document.pdf]
today at 7:12:40 PM02:12:40 [Q] ERROR Failed [name-of-the-3rd-document] - pikepdf's extension library failed to import : Traceback (most recent call last):
today at 7:12:40 PM  File "/usr/local/lib/python3.8/dist-packages/pikepdf/__init__.py", line 13, in <module>
today at 7:12:40 PM    from . import _qpdf
today at 7:12:40 PMImportError: /usr/local/lib/python3.8/dist-packages/pikepdf/_qpdf.cpython-38-aarch64-linux-gnu.so: undefined symbol: _ZN20QPDFPageObjectHelper16placeFormXObjectE16QPDFObjectHandleRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9RectangleEbbb
today at 7:12:40 PM
today at 7:12:40 PMThe above exception was the direct cause of the following exception:
today at 7:12:40 PM
today at 7:12:40 PMTraceback (most recent call last):
today at 7:12:40 PM  File "/usr/local/lib/python3.8/dist-packages/django_q/cluster.py", line 432, in worker
today at 7:12:40 PM    res = f(*task["args"], **task["kwargs"])
today at 7:12:40 PM  File "/app/paperless/src/documents/tasks.py", line 74, in consume_file
today at 7:12:40 PM    document = Consumer().try_consume_file(
today at 7:12:40 PM  File "/app/paperless/src/documents/consumer.py", line 248, in try_consume_file
today at 7:12:40 PM    document_parser.parse(self.path, mime_type, self.filename)
today at 7:12:40 PM  File "/app/paperless/src/paperless_tesseract/parsers.py", line 230, in parse
today at 7:12:40 PM    import ocrmypdf
today at 7:12:40 PM  File "/usr/local/lib/python3.8/dist-packages/ocrmypdf/__init__.py", line 10, in <module>
today at 7:12:40 PM    from ocrmypdf import helpers, hocrtransform, leptonica, pdfa, pdfinfo
today at 7:12:40 PM  File "/usr/local/lib/python3.8/dist-packages/ocrmypdf/helpers.py", line 22, in <module>
today at 7:12:40 PM    import pikepdf
today at 7:12:40 PM  File "/usr/local/lib/python3.8/dist-packages/pikepdf/__init__.py", line 16, in <module>
today at 7:12:40 PM    raise ImportError(_msg) from _e
today at 7:12:40 PMImportError: pikepdf's extension library failed to import

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.