Has anyone had any luck integrating with Libreoffice 6.2.x or 6.3.x in a Linux environment?
Hi,
Has anyone had any luck integrating with a Libreoffice 6.2.x or 6.3.x in a linux environment?
I set PYTHONPATH="/usr/lib/libreoffice/program" so that Carbone can find Uno, but I get some strange errors when Carbone's converter.py is attempting to import from com.sun.star...
When I run the test program with Nodejs debug turned on, i get:
carbone:converter python stderr : Traceback (most recent call last):
File "/usr/local/dcs/node_modules/carbone/lib/converter.py", line 9, in <module>
from com.sun.star.document.UpdateDocMode import QUIET_UPDATE
File "/usr/lib/libreoffice/program/uno.py", line 434, in _uno_import
raise uno_import_exc
File "/usr/lib/libreoffice/program/uno.py", line 356, in _uno_import
return _builtin_import(name, *optargs, **kwargs)
ImportError: No module named 'com' (or 'com.sun.star.document.UpdateDocMode.QUIET_UPDATE' is unknown)
+109ms
carbone:converter process Python of factory 0 died 1 +4ms
carbone:converter process Office of factory 0 died null +70ms
carbone:converter factory 0 is completely off +0ms
carbone:converter python stderr : Traceback (most recent call last):
File "/usr/local/dcs/node_modules/carbone/lib/converter.py", line 9, in <module>
from com.sun.star.document.UpdateDocMode import QUIET_UPDATE
File "/usr/lib/libreoffice/program/uno.py", line 434, in _uno_import
raise uno_import_exc
File "/usr/lib/libreoffice/program/uno.py", line 356, in _uno_import
return _builtin_import(name, *optargs, **kwargs)
ImportError: No module named 'com' (or 'com.sun.star.document.UpdateDocMode.QUIET_UPDATE' is unknown)
+101ms
carbone:converter process Python of factory 0 died 1 +4ms
carbone:converter process Office of factory 0 died null +289ms
carbone:converter factory 0 is completely off +0ms
carbone:converter python stderr : Traceback (most recent call last):
File "/usr/local/dcs/node_modules/carbone/lib/converter.py", line 9, in <module>
from com.sun.star.document.UpdateDocMode import QUIET_UPDATE
File "/usr/lib/libreoffice/program/uno.py", line 434, in _uno_import
raise uno_import_exc
File "/usr/lib/libreoffice/program/uno.py", line 356, in _uno_import
return _builtin_import(name, *optargs, **kwargs)
ImportError: No module named 'com' (or 'com.sun.star.document.UpdateDocMode.QUIET_UPDATE' is unknown)
+99ms
carbone:converter process Python of factory 0 died 1 +3ms
Thanks in advance for any advice!
Cheers,
Nathan
Hi,
How did you install LibreOffice? We strongly recommend using this method: https://github.com/Ideolys/carbone#on-ubuntu-server--ubuntu-desktop This LibreOffice installation method contains everything Carbone needs.
We have some Ubuntu 18.04 LTS servers running successfully with the version 6.3.0.4. Here is the link: http://downloadarchive.documentfoundation.org/libreoffice/old/6.3.0.4/deb/x86_64/LibreOffice_6.3.0.4_Linux_x86-64_deb.tar.gz
Best regards, David.
So, I'm running on Alpine and thus the only binary installs are from the Alpine repo. I guess there's something interesting going on with the Python/LO library integration that I haven't figured out yet.
I’ve already tried to run Carbone in Alpine for a Docker image, but many things were missing and I didn’t succeed. Good luck with it, it’s hard 😄
Ok - I got one run out of it (docker/alpine) - I figured out how the python/libreoffice binding works (at least enough to be dangerous).
I need to do a few more tests now to see if I've really got it.
So, I have succeeded in figuring out how to integrate with 6.2.x and 6.3.x in Alpine (in Docker). Feel free to contact me if you would like to know what I had to do.
Cheers!
Nathan
@ngaldridge I would be interested in this. Are you able to send a gist of your Dockerfile?
Hi,
We are investigating the idea again, we will come back to you.
Hi @pdittaro
You can take a look at carbone-docker if you want a packaged Docker image with a Carbone API exposed. (Upgraded to LibreOffice 6.3.3.1 this morning).
You also could be interested in carbone-connect to have a similar Carbone JS API with some improvements (Promises and Streams).
So, I have succeeded in figuring out how to integrate with 6.2.x and 6.3.x in Alpine (in Docker). Feel free to contact me if you would like to know what I had to do.
Cheers!
Nathan
@ngaldridge would you be able to share your Alpine solution? I've got it working with @fleebzz's carbone-docker container (and using newer node images than the 8 one in there), but interested in seeing your Alpine one as well if available. Thanks.
https://github.com/bcgov/alpine-node-libreoffice/issues/7
I am running into an almost similar issue but the Office is the one that dies.
Anyone with a solution ?
I don't have much details to go with but died 1
carbone-lambda_1 | 2022-06-10T14:41:16.622Z carbone:converter process Office of factory 0 died 1
carbone-lambda_1 | 2022-06-10T14:41:16.626Z carbone:converter process Python of factory 0 died null
carbone-lambda_1 | 2022-06-10T14:41:16.627Z carbone:converter factory 0 is completely off
ngaldridge Hi there, could you share the install instruction on docker alpine 🙏 ? It would be of a great help :)!