Code Monkey home page Code Monkey logo

paperless-home-assistant-addon's Introduction

Benoit Anastay Addon : Paperless-ngx

GitHub Release Project Stage License

Supports armhf Architecture Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

Github Actions Project Maintenance GitHub Activity

Paperless is an application that manages your personal documents. With the help of a document scanner, paperless transforms your wieldy physical document binders into a searchable archive and provides many utilities for finding and managing your documents.

This repository is a custom addon to run paperless-ngx in Home Assistant. Click the button below to install it.

Installation

The installation of this add-on is pretty straightforward and not different in comparison to installing any other Home Assistant add-on.

  1. Click the Home Assistant My button below to open the add-on on your Home Assistant instance.

    Open this add-on in your Home Assistant instance.

  2. Click the "Install" button to install the add-on.

  3. Start the "Paperless-ngx" add-on.

  4. Check the logs of the "Paperless-ngx" add-on to see it in action.

paperless-home-assistant-addon's People

Contributors

benoitanastay avatar thebestmoshe avatar renovate[bot] avatar rudertier avatar egnerfl avatar petewasher avatar axyjo avatar red-avtovo avatar jannislehmann avatar lociii avatar nareddyt avatar

Stargazers

 avatar Tobias Brauell avatar  avatar  avatar  avatar  avatar  avatar Wolfgang avatar Dennis Melzer avatar  avatar  avatar Christian Knittl-Frank avatar  avatar  avatar Ryan Sockalosky avatar  avatar  avatar  avatar  avatar Vladislav Nechayev avatar Spencer Mamer avatar Alexandre avatar 10bn avatar Nils Strelow avatar Michael avatar  avatar Sören avatar Patrick avatar

Watchers

 avatar Niklas Siefke avatar  avatar  avatar

paperless-home-assistant-addon's Issues

paperless ngx add-on Home Assistant / Support for Tika and Gotenberg

Hi, thanks for the work done for the add-on so far. Does the HA paperless ngx add-on provide support for Tika & Gotenberg which is to my knowledge a prerequisite to process doc files or eml emails ? And if yes, how do I enable this ?

Next question would be: is their an import / export process available in the HA paperless add-on to migrate from / to other hardware platforms like eg. paperless docker installation on a NAS?

Thank you very much

Add inotify workaround

When paperless-ngx can't access fs notifications it fails to import new files, there's a workaround documented which is pooling files.

Should add this to the next release

Synology NFS Mount Fails

I mounted my Synlogy as NFS in Home Assistant as /Share/paperless it seems the Docker doesnt have permission and the Addon Stops.
It works if i unmount it and then mount it back while paperless is running.

Hopefully someone can help.

I tried almost everything. Here is the Homeassistant Protocol output:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Paperless-ngx
 Paperless is an application that manages your personal documents. With the help of a document scanner, paperless transforms your wieldy physical document binders into a searchable archive and provides many utilities for finding and managing your documents.
-----------------------------------------------------------
 Add-on version: 1.2.8
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.0  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.2.2
 Home Assistant Supervisor: 2024.02.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[21:29:55] INFO: Configuring timezone (Europe/Berlin)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-paperless: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service redis: starting
s6-rc: info: service redis successfully started
chown: changing ownership of '/share/paperless/consume': Invalid argument
chown: changing ownership of '/share/paperless/media/media.lock': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/thumbnails/0000004.webp': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/thumbnails/0000003.webp': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/thumbnails': Invalid argument
Ingress is enabled
chown: changing ownership of '/share/paperless/media/documents/archive/2024/none/ELSTER - Versandbestätigung.pdf': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/archive/2024/none': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/archive/2024': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/archive/2021/none/Grundriss_Haus.pdf': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/archive/2021/none': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/archive/2021': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/archive': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals/2024/none/ELSTER - Versandbestätigung.pdf': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals/2024/none': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals/2024': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals/2021/none/Grundriss_Haus.pdf': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals/2021/none': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals/2021': Invalid argument
chown: changing ownership of '/share/paperless/media/documents/originals': Invalid argument
chown: changing ownership of '/share/paperless/media/documents': Invalid argument
chown: changing ownership of '/share/paperless/media': Invalid argument
chown: changing ownership of '/share/paperless': Invalid argument
s6-rc: warning: unable to start service init-paperless: command exited 1
s6-rc: info: service init-nginx successfully started
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service init-nginx: stopping
s6-rc: info: service redis: stopping
s6-rc: info: service redis successfully stopped
s6-rc: info: service init-nginx successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

S6-Overlay not executable

After updating to s6-overlay the execution flag wasn't pushed to the repository

unable to exec /etc/s6-overlay/s6-rc.d/init-paperless/run: Permission denied

🐛 Nginx client_max_body_size limited

          I have no luck so far with the config file. Maybe I just wait for your fix and test again.
          "Paper Less" app works so far. The other two are not working but one should be enough :D...
          I have just a limit to upload files >10MB was not working. I think this a nginx limit body size limit, correct?

Originally posted by @MelleD in #70 (comment)

Consuming documents including barcodes fails

Whenever I try to import a document that includes one or some EAN barcode it fails.
Addon log shows:

[2024-02-28 07:27:16,191] [INFO] [celery.worker.strategy] Task documents.tasks.consume_file[ff6a4898-a7b2-4eeb-b9bf-61c8dc2f279a] received
 celery@ca5234a0-paperless-ngx:ForkPoolWorker-144]: ./core/src/Result.cpp:140: bool ZXing::Result::operator==(const ZXing::Result&) const: Assertion `lineCount() == 1' failed.
[2024-02-28 07:27:19,066: ERROR/MainProcess] Process 'ForkPoolWorker-144' pid:450501 exited with 'signal 6 (SIGABRT)'
[2024-02-28 07:27:19,126] [ERROR] [celery.worker.request] Task handler raised error: WorkerLostError('Worker exited prematurely: signal 6 (SIGABRT) Job: 143.')
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
    raise WorkerLostError(
billiard.einfo.ExceptionWithTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
    raise WorkerLostError(
billiard.exceptions.WorkerLostError: Worker exited prematurely: signal 6 (SIGABRT) Job: 143.
"""

Current version: 1.2.5
Core 2024.2.4
Supervisor 2024.02.0
Operating System 12.0
Frontend 20240207.1
Raspberry Pi 4
4 GB RAM

example:
European Article Number – Wikipedia.pdf

regards
Thomas

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
paperless-ngx/Dockerfile
  • ghcr.io/hassio-addons/debian-base 7.3.3
github-actions
.github/workflows/ci.yml
.github/workflows/deploy.yaml
.github/workflows/release-drafter.yaml
regex
paperless-ngx/Dockerfile
  • ghcr.io/hassio-addons/debian-base 7.3.3
paperless-ngx/build.yaml
  • ghcr.io/hassio-addons/debian-base 7.3.3
  • ghcr.io/hassio-addons/debian-base 7.3.3
paperless-ngx/Dockerfile
  • debian_12/gnupg2 2.2.40-1.1
  • debian_12/zbar 0.23.92-7+deb12u1
paperless-ngx/Dockerfile
  • paperless-ngx/paperless-ngx v2.7.2
paperless-ngx/Dockerfile
  • debian_12/curl 7.88.1-10+deb12u5
  • debian_12/gosu 1.14-1+b6
  • debian_12/tzdata 2024a-0+deb12u1
  • debian_12/fonts-liberation 1:1.07.4-11
  • debian_12/gettext 0.21-12
  • debian_12/ghostscript 10.0.0~dfsg-11+deb12u3
  • debian_12/icc-profiles-free 2.0.1+dfsg-1.1
  • debian_12/imagemagick 8:6.9.11.60+dfsg-1.6+deb12u1
  • debian_12/mariadb-client 1:10.11.6-0+deb12u1
  • debian_12/tesseract-ocr 5.3.0-2
  • debian_12/tesseract-ocr-eng 1:4.1.0-2
  • debian_12/tesseract-ocr-deu 1:4.1.0-2
  • debian_12/tesseract-ocr-fra 1:4.1.0-2
  • debian_12/tesseract-ocr-ita 1:4.1.0-2
  • debian_12/tesseract-ocr-spa 1:4.1.0-2
  • debian_12/unpaper 7.0.0-0.1
  • debian_12/pngquant 2.17.0-1
  • debian_12/jbig2dec 0.19-3
  • debian_12/libxml2 2.9.14+dfsg-1.3~deb12u1
  • debian_12/qpdf 11.3.0-1+deb12u1
  • debian_12/file 1:5.44-3
  • debian_12/libmagic1 1:5.44-3
  • debian_12/media-types 10.0.0
  • debian_12/poppler-utils 22.12.0-2+b1
  • debian_12/python3 3.11.2-1+b1
  • debian_12/python3-pip 23.0.1+dfsg-1
  • debian_12/python3-dev 3.11.2-1+b1
  • debian_12/python3-full 3.11.2-1+b1
  • debian_12/python3-magic 2:0.4.26-3
  • debian_12/xz-utils 5.4.1-0.2

  • Check this box to trigger a request for Renovate to run again on this repository

Origin checking failed - https://xyz.de does not match any trusted origins

Hello,

1st of all---localy everything is fine and i love the add-on!

The problem only happens when i try to access PL-NGX from external (www)
My setup looks like:

  • Add-On: Cloudflared installed and configured to my real (external) domain
  • I can login into HA and do everything except PL-NGX
    I tried so many configurations within "192.168.178.72/addon_configs/ca5234a0_paperless-ngx/paperless.conf" (Btw. why not making these configs available in the UI?)
    like setting PAPERLESS_URL, PAPERLESS_CSRF_TRUSTED_ORIGINS, PAPERLESS_ALLOWED_HOSTS to my external domain, internal IP etc. but at the end i'm not able to login to PL-NGX and i get always this error message:

[django.security.csrf] Forbidden (Origin checking failed - https://xyz.de does not match any trusted origins.)

I have the feeling that the "PAPERLESS_CSRF_TRUSTED_ORIGINS" setting is completly ignored.

Can you support please?

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Custom Manager contains disallowed fields: depName, Invalid configuration option: customManagers[1].depName

Acces denied error #13 when using subdirs in consume folder (/usr/share/hassio/share/paperless/consume)

when copying files (pdf) with WinSCP into the consume folder (tree with folders) paperless gives an error 13 access denied for the files in the subfolders. Files in the root folder /usr/share/hassio/share/paperless/consume are 'consumed' without any problems

PermissionError: [Errno 13] Permission denied: '/share/paperless/consume/Informationen/2022-07-04 Betriebsanleitung Notstromaggregat.pdf'
[2024-03-16 15:02:53,171] [ERROR] [celery.app.trace] Task documents.tasks.consume_file[1e6e0659-9383-4930-bebf-46140a851511] raised unexpected: ConsumerError("2022-07-04 Betriebsanleitung Notstromaggregat.pdf: The following error occurred while storing document 2022-07-04 Betriebsanleitung Notstromaggregat.pdf after parsing: [Errno 13] Permission denied: '/share/paperless/consume/Informationen/2022-07-04 Betriebsanleitung Notstromaggregat.pdf'")
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/asgiref/sync.py", line 349, in main_wrap
    raise exc_info[1]
  File "/usr/src/paperless/src/documents/consumer.py", line 740, in try_consume_file
    self.original_path.unlink()
  File "/usr/lib/python3.11/pathlib.py", line 1148, in unlink
    os.unlink(self)

Migrating to your addon from a different addon on HAOS

Hi

I've been pointed in the direction of your Paperless-ngx addon, as I am currently using a different one (link) which is being deprecated. This is currently on a box running HAOS, so is what I believe is a bare metal install.

I have the best part of 500 documents currently added to my instance and I've really rather like to avoid having to start over with adding them.

I tried copying my database files and media etc into the new folder for your add on, and when I started the addon, all my files were listed with all their tags etc. However none of the thumbnails or original files would display as the addon couldn't find them. Are you able to give any guidance on how I can migrate from the other addon into yours?

I've seen mention of The Exporter but I have no idea how I go about using that?

In addition, I'd like to know if it's possible to mount a shared folder on a NAS box for the files to be stored on, I thought I done this in the current addon I'm using but it seems like all I've actually done is created a new folder within the Media folder for the addon.

Any help you can give would be much appreciated.

Thanks

[Feature Request] Add Home Assistant shortname as allowed domain

In Tailscale there is a magic DNS resolution for the URL (https://tailscale.com/kb/1081/magicdns). Unfortunately it is not compatible with homeassistant.local because
a) The default setting uses homeassistant as DNS without local
b) Only dashes and no dots are allowed in the hostname

With the new setting CSRF trusted domain you can set the url http://homeassistant:port. This is working as well :).
Maybe it's worth considering introducing a checkbox "Enable tailscale magic dns" in the config to automatically determine the url.

Configuration of Username and Passwort

Setting the inital username and passord of the superuser in the configuration does not work.
User is unknown according to the first login trys.

Did I miss something? If so I think that has to be clarified in the Readme.

Cheers :)

Barcode recognition fail

They needed to be big enough it seems, as these [QR codes](https://margau.net/posts/2023-04-16-paperless-ngx-asn/pdf/labels4731_001.pdf) did not work (via reference from [margau.net](https://margau.net/posts/2023-04-16-paperless-ngx-asn/). When using bigger 1D barcodes things were working. I guess this has to do with paperless itself and not with your add-on.

Originally posted by @sahnetorti in #35 (comment)

Solution :
Adding Zxing to the add-on

Paperless mobile

Hello everyone,

How can I use paperless mobile? I don't understand where I have to set what so that I can use it? Can anyone help me with this?

Not able to log in if default admin password wasn't changed

Just installed current version: 1.2.8 for the first time.

did not change the default superuser:

username: admin
email: [email protected]
password: changeme

so i tried to login with unsername: admin and password: changeme

just to get "Username or password is not correct"

from the protocol:
...[INFO] [paperless.auth] Login failed for user adminfrom private IP[my-local-IP]`

I also tried to change the password in the config, with same result.

Do i miss something?

media and consume directory not found when mounted as nfs

I created a nfs network share with name "paperless" and usage "share". When starting paperless-ngx addon i see the following error message in the logs:

?: PAPERLESS_CONSUMPTION_DIR is set but doesn't exist.
	HINT: Create a directory at /share/paperless/consume
?: PAPERLESS_MEDIA_ROOT is set but doesn't exist.
	HINT: Create a directory at /share/paperless/media

the metioned folders do exist on the host. When I remove the network share, the addon starts without any issues.

Error when creating Home Assistant sensor

Firstly, thanks for maintaining such a useful add-on.

I've tried following the "info" instructions on how to create a REST sensor for the inbox. I get this error:
Invalid config for 'rest' from integration 'sensor' at configuration.yaml, line 113: invalid url for dictionary value 'resource', got 'ca5234a0_paperless-ngx/api/documents/'

This is what I added to the configuration.yaml:

sensor:
  - platform: rest
    unique_id: 5dade7bc-ddb7-442e-bb17-0d379dbf01fb
    resource: ca5234a0_paperless-ngx/api/documents/
    headers:
      Authorization: !secret paperless_auth_header
    params:
      query: "tag:inbox"
    value_template: "{{ value_json.count | int }}"
    name: "Paperless Inbox"
    icon: mdi:inbox

I've enabled direct access on port 8000.

I suspect I need to do something different with the "resource" value, but I'm not sure what. Can you please help?

Thanks!

[Feature Request] allow "user" to use add-on, not only admins

Paperless-ngx can work with different users.

With the Home Assistant Add-On, you can only open up the add-on, when an admin is logged in to Home-Assistant.

Is there a way, to use the Add-on as normal user, because paperless-ngx use it's own authentication, so it is not a security issue.

Request for:

  • panel_admin: false

Unable to open any documents and no access through external URL

Hello,
thank you for the very nice work!!
I have installed the addon and it works fine except for the 2 issues mentioned in the title.

  1. If I open any document then the preview doesn't show. Instead, I get an "Öffnen" Button where the preview should be. If I click that button then a new browser tab opens where the following error message is displayed: "401: Unauthorized" .

  2. Accessing the paperless instance through the external URL doesn't work at all.
    I get the following error:
    [2024-03-26 13:00:03,606] [WARNING] [django.security.csrf] Forbidden (Origin checking failed - https://mydomainname does not match any trusted origins.): /api/hassio_ingress/A1Tv2B4Kq17L5uGP-pZM3xtZzzTXgXL65VRG_b2IFMI/accounts/login/

I have set the internal and external URL manually to http://homeassistant.local:8123/ and ttps://mydomainname according to the issues #69 and #72.

That didn't help. According to what I understand in these issues the problem should have been fixed?
Any help would be much appreciated. If possible please provide exact instructions where exactly to change any settings as I didn't understand for some suggestions given in the issues above where and how the suggested settings can be changed.
Thank you!

Tika Gotenberg

Hello and Thank you for your work,

how can i use Tika and Gotenberg.

I activate them in the config. Or is that not active? I have at least activated this in the config file. But I am not sure. but he says to me: Could not parse content with tika server at http://192.169.178.123:9998: [Errno 111] Connection refused.

which address is the correct one to use?

Worker exited prematurely: signal 6 (SIGABRT)

When trying to process a file via the Consumption folder. I get the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
    raise WorkerLostError(
billiard.exceptions.WorkerLostError: Worker exited prematurely: signal 6 (SIGABRT) Job: 2.

Is there a solution here?

Many thanks for your support!

🦺 No input validation for admin login and password configuration

Hallo I hope someone could help me,

i installed the paperless home assistant addon.

If i try to login, I allways get the message that username and password are not matching.

in German:
"Ihr Benutzername und Kennwort stimmen nicht überein. Bitte versuchen Sie es erneut."

Log says this:
2024-01-30 20:51:41,150] [INFO] [paperless.auth] Login failed for user xxx from private IP

I deinstalled and reinstallad the addon several times. and tried other Superuser names.

Is there anything I could do?

Kind regards Max

Error message CSRF Failed - plugin version 1.1.1

I have updated today to version 1.1.1 of the plugin.
First off, everything looks OK but when I tried to change a setting (name of a saved view) I got an error message, see below.
It probably is some configuration issue, but I cannot find anything in the documentation of the add-on and homeassistant. Neither a google search provided good resources.

This is with accessing paperless through the URL:
http://homeassistant.local:8123/hassio/ingress/ca5234a0_paperless-ngx

Error message:

{"headers":{"normalizedNames":{},"lazyUpdate":null},"status":403,"statusText":"Forbidden","url":"http://homeassistant.local:8123/api/hassio_ingress/c9w93rKVWvLjAS5nnaXz7ACFa_daeCZTPTv9Xnz8-xw/api/ui_settings/","ok":false,"name":"HttpErrorResponse","message":"Http failure response for http://homeassistant.local:8123/api/hassio_ingress/c9w93rKVWvLjAS5nnaXz7ACFa_daeCZTPTv9Xnz8-xw/api/ui_settings/: 403 Forbidden","error":{"detail":"CSRF Failed: Origin checking failed - http://homeassistant.local:8123 does not match any trusted origins."}}

When I try with the IP address in the URL like this:
http://192.168.0.68:8123/ca5234a0_paperless-ngx/ingress
I get the login-screen and after logging in the same message:

Verboten (403)
CSRF-Verifizierung fehlgeschlagen. Anfrage abgebrochen.
Mehr Information ist verfügbar mit DEBUG=True.

which translates to the same issue above.

Enable configuration of barcode & ASN parsing

I have started using paperless via this add-on and like both, paperless and the add-on. Thanks for all the work!

I am a bit of a loss to where to ask the proper question, if this is not the right place maybe you can point me towards it :)
I would like to use the automatic ASN barcode/QR code scanning feature of paperless. In the original paperless documentation it is mentioned that the options PAPERLESS_CONSUMER_ENABLE_BARCODES and PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE must be set to "true" and default to "false".
I am at a loss how to set these options in the context of the add-on.
Any help appreciated.

settings PAPERLESS_CONSUMER_RECURSIVE and PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS

Hi,
I really like your integration, so far it works quite nice on my rpi4.
What I'm missing are these options for an initial import of my folder based document structure:
PAPERLESS_CONSUMER_RECURSIVE and PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS
description here: https://docs.paperless-ngx.com/configuration/#PAPERLESS_CONSUMER_RECURSIVE

Both are false by default and I couldn't find any way to set them to true.

Would be great to be able to set these options.
Thanks,
Michael

document_exporter fails with error message 'no such table: documents_correspondent'

Today I tried to export the full dataset with the built-in command from paperless as a means to have another backup method (I do backup by taring the relevant paperless directories and copy them to another location). I'd prefer the export command as this will make it more flexible in case the database backend changes (i.e. postgres)

Wenn calling the exporter from a ssh session on HAOS with this command:
docker exec addon_ca5234a0_paperless-ngx document_exporter ../export
I get a (long) stack trace, see below.

I also tried directly from within the docker container, issuing the command from the data directory with the same result:
root@ca5234a0-paperless-ngx:/usr/src/paperless/data# document_exporter ../export

paperless docker exec  addon_ca5234a0_paperless-ngx document_exporter ../export
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/sqlite3/base.py", line 328, in execute
    return super().execute(query, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such table: documents_correspondent

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/paperless/src/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 203, in handle
    self.dump(options["no_progress_bar"])
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 232, in dump
    serializers.serialize("json", Correspondent.objects.all()),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/core/serializers/__init__.py", line 134, in serialize
    s.serialize(queryset, **options)
  File "/usr/local/lib/python3.11/dist-packages/django/core/serializers/base.py", line 132, in serialize
    for count, obj in enumerate(queryset, start=1):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python3.11/dist-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/models/query.py", line 91, in __iter__
    results = compiler.execute_sql(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/usr/local/lib/python3.11/dist-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/sqlite3/base.py", line 328, in execute
    return super().execute(query, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: no such table: documents_correspondent

Any help appreciated :)

Allow raw alternative URLs

          > My setting works with the trusted domain. All is fine.

          It shouldn't have worked that way so I'll try to allow both domains and raw urls to               be added in the next release

Originally posted by @BenoitAnastay in #81 (comment)

Ability to add domains as allowed CSRF isn't enough, it may cause issues when someone need to add alternative URLs

Constant "cannot add item to database" and high CPU Usage

Hello everyone,
I am somehow having a Problem with the Add-on, but am not sure what might be the cause of this issue.

The logs show the following:

[2024-03-19 13:47:54,629] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,629] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,629] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,630] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,630] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,630] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,630] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,631] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,631] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,631] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,631] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,632] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,632] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,632] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,632] [WARNING] [celery.redirected] _dbm
[2024-03-19 13:47:54,632] [WARNING] [celery.redirected] .
[2024-03-19 13:47:54,633] [WARNING] [celery.redirected] error
[2024-03-19 13:47:54,633] [WARNING] [celery.redirected] : 
[2024-03-19 13:47:54,633] [WARNING] [celery.redirected] cannot add item to database
[2024-03-19 13:47:54,695] [WARNING] [celery.redirected] Exception ignored in: 
[2024-03-19 13:47:54,696] [WARNING] [celery.redirected] <function Shelf.__del__ at 0x7fba86258cc0>
[2024-03-19 13:47:54,697] [WARNING] [celery.redirected] Traceback (most recent call last):
[2024-03-19 13:47:54,697] [WARNING] [celery.redirected]   File "/usr/lib/python3.11/shelve.py", line 162, in __del__
[2024-03-19 13:47:54,699] [WARNING] [celery.redirected]     
[2024-03-19 13:47:54,699] [WARNING] [celery.redirected] self.close()
[2024-03-19 13:47:54,700] [WARNING] [celery.redirected]   File "/usr/lib/python3.11/shelve.py", line 144, in close
[2024-03-19 13:47:54,700] [WARNING] [celery.redirected]     
[2024-03-19 13:47:54,701] [WARNING] [celery.redirected] self.sync()
[2024-03-19 13:47:54,701] [WARNING] [celery.redirected]   File "/usr/lib/python3.11/shelve.py", line 168, in sync
[2024-03-19 13:47:54,702] [WARNING] [celery.redirected]     
[2024-03-19 13:47:54,702] [WARNING] [celery.redirected] self[key] = entry
[2024-03-19 13:47:54,703] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,704] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,704] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,704] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,705] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,705] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,706] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,706] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,707] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,707] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,707] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,708] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,708] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,708] [WARNING] [celery.redirected]   File "/usr/lib/python3.11/shelve.py", line 125, in __setitem__
[2024-03-19 13:47:54,709] [WARNING] [celery.redirected]     
[2024-03-19 13:47:54,709] [WARNING] [celery.redirected] self.dict[key.encode(self.keyencoding)] = f.getvalue()
[2024-03-19 13:47:54,709] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,710] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,710] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,711] [WARNING] [celery.redirected]  
[2024-03-19 13:47:54,711] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,711] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,712] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,712] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,712] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,713] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,713] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,713] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,713] [WARNING] [celery.redirected] ~
[2024-03-19 13:47:54,714] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,714] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,714] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,714] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,715] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,715] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,715] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,716] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,716] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,716] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,716] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,717] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,717] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,717] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,717] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,718] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,718] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,718] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,719] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,719] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,719] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,719] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,720] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,720] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,720] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,721] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,721] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,721] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,721] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,722] [WARNING] [celery.redirected] ^
[2024-03-19 13:47:54,722] [WARNING] [celery.redirected] _dbm
[2024-03-19 13:47:54,722] [WARNING] [celery.redirected] .
[2024-03-19 13:47:54,722] [WARNING] [celery.redirected] error
[2024-03-19 13:47:54,722] [WARNING] [celery.redirected] : 
[2024-03-19 13:47:54,723] [WARNING] [celery.redirected] cannot add item to database
2024-03-19 13:47:54,980 WARN exited: celery-beat (exit status 1; not expected)
2024-03-19 13:47:55,983 INFO spawned: 'celery-beat' with pid 3461
celery beat v5.3.6 (emerald-rush) is starting.
2024-03-19 13:47:57,512 INFO success: celery-beat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

(Running on Core i5 NUC)

Add-on Screenshot

Is this some kind of common problem? 😅

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.