unoconv / unoserver

MIT License
495 stars 69 forks source link

unable to start UnoServer from python #88

Closed sadaqabdo closed 8 months ago

sadaqabdo commented 9 months ago

Hello,

I'm attempting to run UnoServer from inside a ubuntu20.04 docker container with python . I've ensured that the required libraries are installed in the image libreoffice and default-jre-headless.

When I execute UnoServer using the subprocess module as shown below, it works perfectly:

import subprocess
CMD = ["unoserver"]
result = subprocess.run(CMD)

However, a problem arises when I use the native Python approach:

from unoserver.server import UnoServer
unoserver = UnoServer()
unoserver.start()

This results in the following error:

javaldx failed!
Warning: failed to read path from javaldx
LibreOffice 6.4 - Fatal Error: The application cannot be started. 
[context="user"] caught unexpected com.sun.star.ucb.ContentCreationException: Cannot create folder (invalid path): 'None'

any idea why it crashes and how can I achieve it? Thanks

regebro commented 9 months ago

I would recommend to not start it from Python. It will not only soon become harder, there's really no point in doing that.