Office conversion fails (LibreOffice / unoconv incompatibilities)
-
Importing Office documents (XLSX, DOCX, DOC) via API, Webinterface and Consume folder fails on my Cloudron Instance with Paperless.
I found two compatibility issues in the Gotenberg/LibreOffice conversion process. Both could be resolved with a temporary workaround.
I'm not sure whether this affects all installations or just mine.
Environment
Component Version Cloudron package 1.66.0 Paperless-ngx 3.3.0 LibreOffice 26.2.6.3 unoconv 0.8.2 Python 3.14.4 1. LibreOffice 26.2 incompatibility
Gotenberg returns HTTP 500 when converting Office documents.
Debug logs:
File "/usr/bin/unoconverter", line 1012, in convert inputurl = unohelper.absolutize(...) AttributeError: module 'unohelper' has no attribute 'absolutize'The installed
/usr/bin/unoconvertercontains three references to this function:1012: inputurl = unohelper.absolutize(...) 1026: templateurl = unohelper.absolutize(...) 1166: outputurl = unohelper.absolutize(...)This appears to be a known LibreOffice 26.2 incompatibility:
https://bugs.debian.org/1143523
Workaround: Map the missing function to
uno.absolutize().After applying this fix, direct XLSX conversion via Gotenberg works (HTTP 200).
However, importing XLSX through Paperless still fails.
2. Unsupported unoconv argument
Paperless sends these parameters to Gotenberg:
pdfa: PDF/A-2b updateIndexes: falseGotenberg passes
--disable-update-indexesto unoconv.Debug output:
unoconv: option --disable-update-indexes not recognized, try unoconv -h for a list of all the optionsResult:
exit status 255 HTTP 500Workaround: Remove the unsupported argument before unoconv processes it.
After applying this second fix, XLSX imports through Paperless work again.
Temporary workaround
Create
/app/data/gotenberg-fix/sitecustomize.py:import uno import unohelper import sys unohelper.absolutize = uno.absolutize if "--disable-update-indexes" in sys.argv: sys.argv.remove("--disable-update-indexes")Make sure the file is readable by the
cloudronuser.Stop Gotenberg:
supervisorctl stop gotenbergStart it manually with the patch:
runuser -u cloudron -- env \ HOME=/home/cloudron \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHONPATH=/app/data/gotenberg-fix \ gotenberg --log-level=debugThis works but is not persistent across restarts.
The second patch also ignores the
updateIndexes=falsesetting, so it's only a workaround.Test results
Test Before After Gotenberg health HTTP 200 HTTP 200 Direct XLSX conversion HTTP 500 HTTP 200 XLSX import in Paperless Failed Works Direct LibreOffice conversion also works without the workaround.
Suggested fix
The Cloudron package likely needs two changes:
- Update or patch unoconv to replace
unohelper.absolutize()withuno.absolutize(). - Fix the incompatibility between Gotenberg and unoconv regarding
--disable-update-indexes.
Questions
- Can anyone reproduce this with Paperless-ngx package 1.66.0 on a fresh installation?
- Are LibreOffice and unoconv versions identical across installations?
- Could these two issues be addressed in the Cloudron package?
I haven't tested a fresh installation. The workaround fixes XLSX imports on my existing installation.
Related issue: https://forum.cloudron.io/topic/13545/gotenberg-permission-issue-and-large-log-volume
- Update or patch unoconv to replace
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login