linuxserver / docker-paperless-ng

GNU General Public License v3.0
33 stars 7 forks source link

ImportError: pikepdf's extension library failed to import #8

Closed l4rm4nd closed 2 years ago

l4rm4nd commented 3 years ago

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
github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

francescofum commented 2 years ago

Still having issue on raspberry pi 4gb running ubuntu 22.04

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ssabdb commented 2 years ago

I'm still having the issue, rpi 4gb running ubuntu 20.04.

jemelo commented 1 year ago

O kind of quit on it and started developing my own paperless system, but since I’m involved on it I will try these options, sorry.

On Sun, 3 Apr 2022 at 11:35, Roxedus @.***> wrote:

Why does this issue keep getting comments, while noone tests pr?

— Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-paperless-ng/issues/8#issuecomment-1086845184, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIPITK4Y5T3FDGNSRS7WXLVDF66DANCNFSM5C6FJZ3Q . You are receiving this because you were mentioned.Message ID: @.***>

-- Sent from Gmail Mobile