Description
- Templated-docs version: 0.3.1
- Python version: 2.7.6
- Operating System: Ubuntu 14.04.5
Description
I can successfully generate .docx files in development (Ubuntu 16.04), but it hangs/times out on when deployed to the server (Ubuntu 14.04).
I have tried LO versions 5.1.6.2 and 5.3.2.2.
Nginx & Gunicorn timeouts are 120s. It will successfully generate the templates in 2-3 seconds on my laptop, so the timeout is not the issue. The processor is idle throughout.
Edit:
It seems I am able to create .odt files, but not .doc. or .docx on the server.
What I Did
I've added logging to every step of process and discovered that it doesn't seem to get past
https://github.com/alexmorozov/templated-docs/blob/master/templated_docs/__init__.py#L92
This would indicate a problem with LO.
On the server, I can successfully convert an .odt file to .docx with the pylokit example...
>>> import os
>>> lo_path = "/usr/lib/libreoffice/program"
>>> with Office(lo_path) as lo:
... with lo.documentLoad("report_end_of_course.odt") as doc:
... doc.saveAs("myNewFile.docx")
Is there anything I can try to debug this further?
Thanks