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

5

20

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?

Ecchymosis answered 13/2, 2012 at 11:48 Comment(0)
D
11

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

Discriminant answered 11/6, 2012 at 23:58 Comment(0)
I
3

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

Inbred answered 21/6, 2019 at 22:52 Comment(1)
You may use this command in ubuntu: sudo pkill -f 'soffice.bin'Married
S
0

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

Stayathome answered 19/2, 2015 at 16:32 Comment(0)
H
0

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.

Hiro answered 28/9, 2015 at 7:13 Comment(0)
H
-8

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.

Hoodmanblind answered 30/12, 2013 at 10:29 Comment(2)
Misinformation here: although it's not perfect, it does support Office Open XML (.docx, .pptx and .xlsx): github.com/dagwieers/unoconv/blob/master/unoconvLappet
Yes, it does support it - but like I said, it probably would work by renaming the files to a regular .doc/.pptHoodmanblind

© 2022 - 2024 — McMap. All rights reserved.