Browse files

Adding better error messages for when they can't connect to a LibreOf…

…fice server
  • Loading branch information...
holloway committed Sep 19, 2011
1 parent 1856d90 commit 0f58ec0265d9d40cdb17f1abad76d004310b71ff
@@ -1,6 +1,27 @@
Docvert 5.1
Released under the GPL3 see LICENCE
+ Python 2.6 with lxml.
+ pdf2svg and rsvg.
+ If you want to convert Microsoft Office files you'll need:
+ LibreOffice or server (which can run 'headless')
+ PyUNO (python-uno)
+ To set this up on DEBIAN/UBUNTU/MINT just run
+ apt-get install docvert-libreoffice
+ or
+ apt-get install
+ Alternatively, if you want to do it manually then run (change the path to
+ your install of LibreOffice/
+ /usr/bin/soffice -headless -norestore -nologo -norestore -nofirststartwizard -accept="socket,port=2002;urp;"
+ This runs a single instance. If you want to run a pool of instances then
+ try something like
WEB SERVICE http://localhost:8080
python ./ [-p PORT]
@@ -65,7 +65,7 @@ def __init__(self, port=DEFAULT_LIBREOFFICE_PORT):
context = resolver.resolve("uno:socket,host=localhost,port=%s;urp;StarOffice.ComponentContext" % port)
except NoConnectException, exception:
- raise Exception, "Failed to connect to on port %s. %s" % (port, exception)
+ raise Exception, "Failed to connect to LibreOffice on port %s. %s\nIf you don't have a server then read README for 'OPTIONAL LIBRARIES' to see how to set one up." % (port, exception)
self._desktop = context.ServiceManager.createInstanceWithContext("", context)
def convert_by_stream(self, data, format=LIBREOFFICE_OPEN_DOCUMENT):
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 0f58ec0

Please sign in to comment.