Open RossLYoung opened 7 years ago
@RossLYoung Hi Did you find solution for debuging?
@AnSharipov No solution. As above, everything works in development on the laptop. On the server templated-docs can't convert odt to doc/docx. It just hangs. On the server, I can manually convert to doc/docx using the pylokit example. It's very strange.
@RossLYoung I have the same problem. I use your way to convert files and it works. How do you download file after its converted?
I have the same problem.
After some research, I found the problem. uWSGI runs with uid www-data. Libreoffice can't create .config in HOME directory of www-data user, because www-data don't have permission for that.
I did:
sudo mkdir /home/www-data
sudo usermod -d /home/www-data www-data
sudo chown www-data:www-data /home/www-data
Or you can try:
sudo chown -R www-data:www-data /var/www
It helped me. Sorry for my English. :blush:
Hi @minidron thank you for your help! I tried both ways, but still getting 502 error. home and www-data doesn't contain .config file
@AnSharypov
Try this:
@minidron I forgot to mention I use Gunicorn
@AnSharypov If you want, you can write here your email, I send you email with my VK profile and try there help you.
@minidron https://vk.com/andreysharipov it would be great!
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...
Is there anything I can try to debug this further?
Thanks