Krishna Prasad Varma
Krishna Prasad Varma

Reputation: 4740

unoconv not working while trying to convert. throws Error: Unable to connect or start own listener. Aborting

I am trying to convert docx to pdf using unoconv, but getting Error: Unable to connect or start own listener. Aborting. when I run unoconv -f pdf 1234.docx.

So, there must be some listener. I then started the listener via unoconv --listener.
I tried ps aux | grep soffice, and found soffice.bin.

So I tried unoconv -f pdf 1234.docx again. It still gave me the same error: Error: Unable to connect or start own listener. Aborting.

What am I doing wrong here?

Upvotes: 20

Views: 16468

Answers (5)

Guido Barosio
Guido Barosio

Reputation: 31

You need to kill all soffice.bin processes before executing unoconv

Upvotes: 3

Charlie
Charlie

Reputation: 23798

Failing to start instance hints at the inability of the script to find the LibreOffice program.

Do this basic test:

  1. Copy the unoconverter to "libreoffice/program" folder.

  2. IMPORTANT: Go there and try to execute ./soffice to verify that the soffice runs itself.

  3. Now run unoconv with the version of python that shipped with the LibreOffice by typing ./python unocov -f pdf 1234.docx

You should see the converted file in the same directory now. Kill the soffice process and retry if it generates the same error.

Upvotes: 0

rbalint
rbalint

Reputation: 1

It fails with the error in the question if it does not find the LibreOffice personal configuration file, but it also creates them before exiting. The second run succeeds.

You can reproduce the error but removing the personal configuration files, then trying to run unoconv:

$ rm -rf .config/libreoffice/
$ unoconv foo
Error: Unable to connect or start own listener. Aborting.

https://github.com/dagwieers/unoconv/issues/241

Upvotes: 0

shrty
shrty

Reputation: 404

unoconv does not support .docx / .pptx etc.

You need to use the old document extension, which is .doc, .ppt.

A simple rename would probably solve the problem.

Upvotes: -8

Marcos García
Marcos García

Reputation: 622

You have to kill all the soffice.bin processes before trying to use unoconv. I didn't have to do any "unoconv --listener" command.

Upvotes: 11

Related Questions