unoconv preview problem

2,112 views
Skip to first unread message

Chris Blair

unread,
Apr 7, 2015, 12:11:18 PM4/7/15
to resour...@googlegroups.com
I'm setting up & testing a new installation and am trying to get unoconv/Libreoffice configured to create previews of documents, spreadsheets, presentations etc. This is on a shared server and getting both Libreoffice and unoconv to play nice on the command line was a chore but it's working there, but only for certain types of documents. I'm having similar issues in RS although there are some additional problems there.

On the command line, documents in open document formats convert both accurately and at the right size. Word documents (docx, xlsx etc.) do not, with the command line error:

does not exist. unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <file:///nfs/c10/h04/mnt/150983/users/.home/unoconv/tests/RS16_Intern>: "type detection failed"

But...the file does indeed exist so I assume unoconv or libreoffice aren't able to figure out the file type.

The same thing happens in RS except...with open document format files, it creates the thumbnail preview file, but doesn't seem to create the full-screen preview...which I assume should be a pdf file.

Here is the relevant part of the error log from RS with a .docx file:

2015-04-07 15:13:37 SQL: insert into resource_data(resource,resource_type_field,value) values ('19','51','RS16_Intern Review.docx')
2015-04-07 15:13:37 create_previews(ref=19,thumbonly=,extension=docx,previewonly=,previewbased=,alternative=-1,ingested=)
2015-04-07 15:13:37 SQL: update resource set file_checksum='' where ref='19'
2015-04-07 15:13:37 SQL: update resource set preview_tweaks = '0|1' where ref = '19'
2015-04-07 15:13:37 File source is /nfs/c10/h04/mnt/150983/domains/videomicloud.com/html/include/../filestore/1/9_431918ec6ad7d7f/19_3c94b76ae0d64d0.docx
2015-04-07 15:13:37 SQL: update resource set has_image=0 where ref='19'
2015-04-07 15:13:37 Starting preview preprocessing. File extension is docx.
2015-04-07 15:13:37 CLI command: /nfs/c10/h04/mnt/150983/users/.home/unoconv/unoconv --format=pdf '/nfs/c10/h04/mnt/150983/domains/videomicloud.com/html/include/../filestore/1/9_431918ec6ad7d7f/19_3c94b76ae0d64d0.docx'
2015-04-07 15:15:07 CLI output: 
2015-04-07 15:15:07 CLI errors: unoconv: RuntimeException during import phase:
Office probably died. C++ code threw St9bad_alloc: std::bad_alloc
Traceback (most recent call last):
  File "/nfs/c10/h04/mnt/150983/users/.home/unoconv/unoconv", line 1172, in <module>
    die(exitcode)
  File "/nfs/c10/h04/mnt/150983/users/.home/unoconv/unoconv", line 1048, in die
    convertor.desktop.terminate()
uno.RuntimeException: C++ code threw St13runtime_error: osl::Thread::create failed
2015-04-07 15:15:07 CLI command: unzip -p

And here is the relevant part of the error log from RS with the .odt file:

2015-04-07 15:34:10 Starting preview preprocessing. File extension is odt.
2015-04-07 15:34:10 CLI command: /nfs/c10/h04/mnt/150983/users/.home/unoconv/unoconv --format=pdf '/nfs/c10/h04/mnt/150983/domains/videomicloud.com/html/include/../filestore/2/0_eafd44dbe90d469/20_de7ab5c3477c621.odt'
2015-04-07 15:34:14 CLI output: 
2015-04-07 15:34:14 CLI errors: unoconv: UnoException during import phase:
The document 'file:///nfs/c10/h04/mnt/150983/domains/videomicloud.com/html/filestore/2/0_eafd44dbe90d469/20_de7ab5c3477c621.odt' could not be opened.
2015-04-07 15:34:14 CLI command: unzip -p '/nfs/c10/h04/mnt/150983/domains/videomicloud.com/html/include/../filestore/2/0_eafd44dbe90d469/20_de7ab5c3477c621.odt' "Thumbnails/thumbnail.png" > /nfs/c10/h04/mnt/150983/domains/videomicloud.com/html/include/../filestore/2/0_eafd44dbe90d469/20_de7ab5c3477c621.jpg

I think the .docx issue might be missing or incorrect filters in libreoffice. But I'm not sure why RS is failing on the .odt file since it works fine on the command line. Anyone have any insight on this?

Thanks!

Chris Blair

Chris Blair

unread,
Apr 14, 2015, 10:42:41 AM4/14/15
to resour...@googlegroups.com
This seems to be a problem with how the file path is sent from either RS or PHP to the command line. I got unoconv working completely from the command line. So if I send a conversion string on the command line, I've been able to convert just about all the document types that unoconv and libreoffice are supposed to convert. But from RS, I now get errors that say it can't find the file. The paths appear correct, but something is preventing it from actually finding and loading the file. Anyone have any insight on this? I'd love to get this working.

Chris Blair
Message has been deleted
Message has been deleted

George at Presentious

unread,
Apr 29, 2016, 12:20:26 PM4/29/16
to ResourceSpace
Chris - did you ever figure this out? Have just recently been experiencing the same issue.

Best,
George

Andreas Andrade

unread,
Mar 28, 2017, 3:16:53 PM3/28/17
to ResourceSpace
Hello Chris.

I wonder to know if you got some solution for this problem. I'm experiencing the same error when trying to convert a RTF file over network. 
I have two machines, one of them running unoconv service (listenning).

Thank you.
Reply all
Reply to author
Forward
0 new messages