Bug 1076275 - unonconv trips over '-f latex'
Summary: unonconv trips over '-f latex'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: unoconv
Version: 20
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: David Tardon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-14 01:11 UTC by Michal Jaegermann
Modified: 2014-04-28 17:43 UTC (History)
1 user (show)

Fixed In Version: unoconv-0.6-10.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-28 04:52:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2014-03-14 01:11:35 UTC
Description of problem:

According to 'unoconv --show' LaTeX is one of recognized formats; well, at least for an output.  But if I try

   unoconv -f latex <a file in a suitable format>

then invariably I see:

unoconv: UnoException during export phase:
Unable to store document to file:///var/tmp/chk/<some_name>.ltx (ErrCode 2074)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"LaTeX_Writer" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x2369448{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })

A random sample of various 'unoconv -f <recognized_format> ...' seems to work with the same inputs tried above provided that <recognized_format> != "latex".  What gives?

Version-Release number of selected component (if applicable):
unoconv-0.6-8.fc20

How reproducible:
every time I tried

Additional info:
Apparently to get such conversion one should first convert, as needed, to something acceptable to abiword and export as LaTeX from there.  Results are recognizable if not immediately of "sufficient quality". :-)

Comment 1 David Tardon 2014-04-17 12:39:23 UTC
libreoffice-writer2latex is needed for this

Comment 2 Fedora Update System 2014-04-17 13:52:52 UTC
unoconv-0.6-9.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/unoconv-0.6-9.fc20

Comment 3 Fedora Update System 2014-04-17 13:53:26 UTC
unoconv-0.6-9.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/unoconv-0.6-9.fc19

Comment 4 Fedora Update System 2014-04-18 15:32:27 UTC
Package unoconv-0.6-9.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing unoconv-0.6-9.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5282/unoconv-0.6-9.fc20
then log in and leave karma (feedback).

Comment 5 Michal Jaegermann 2014-04-18 16:50:08 UTC
(In reply to Fedora Update System from comment #4)
> Package unoconv-0.6-9.fc20:
> * should fix your issue,

I am afraid that I fail to see that.  I updated to  unoconv-0.6-9.fc20 and I tried such conversions on two short .docx documents and in both cases I got:

$ unoconv -f latex some_file.docx 
unoconv: UnoException during export phase:
Unable to store document to file:///var/tmp/some_file.ltx (ErrCode 2074)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"LaTeX_Writer" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x2826798{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })

BTW - I tried to load said documents into oowriter and export as LaTeX.  This works and I see in results:

% This file was converted to LaTeX by Writer2LaTeX ver. 1.0.2
% see http://writer2latex.sourceforge.net for more info
\documentclass[letterpaper]{article}
\usepackage[utf8]{inputenc}
...... (and so on) .....

One of files was just a text and another had an embedded image.  All of that was handled correctly and results were acceptable to 'pdflatex'.

Not that I deeply care about these conversions, or would like to use an oowriter produced LaTeX markup "as is", but ...

Comment 6 David Tardon 2014-04-18 18:32:49 UTC
Right. The reality is a bit more complicated. The writer2latex filter was apparently integrated in openoffice.org in the past (version 2.0.4 is mentioned). Since unoconv is a generic tool, capable of working with any openoffice.org / libreoffice version, the format has never been removed from the list. (Neither have been the other export filters that have been removed in libreoffice: pdb, psw, all the old StarOffice binary formats...)

I will replace the latex filter name with the one used by the separate writer2latex extension. I will also clean up the export formats list a bit.

Comment 7 Fedora Update System 2014-04-19 10:50:47 UTC
unoconv-0.6-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/unoconv-0.6-10.fc20

Comment 8 Fedora Update System 2014-04-19 10:51:06 UTC
unoconv-0.6-10.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/unoconv-0.6-10.fc19

Comment 9 Michal Jaegermann 2014-04-19 15:40:40 UTC
(In reply to Fedora Update System from comment #7)
> unoconv-0.6-10.fc20 has been submitted as an update for Fedora 20.

Still no dice, I am afraid.  On the first attempt I got an error message which I did not see up to now.  Namely:

Error: Unable to connect or start own listener. Aborting.

Subsequent tries brought something in a style similar to error messages quoted before but not really the same.  In particular 
"org.openoffice.da.writer2latex" in this seems to be new and an error code is different.  The whole thing is like this:

Unable to store document to file:///var/tmp/some_file.ltx (ErrCode 3088)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x2add648{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"org.openoffice.da.writer2latex" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })

BTW - unoconv-0.6-10.fc20 dragged in by dependencies quite sizeable openoffice.org-diafilter.  Curiosly enough all other "oofice" packages seem to start with "libreoffice-".  Was that really intended?

Comment 10 David Tardon 2014-04-19 16:03:26 UTC
(In reply to Michal Jaegermann from comment #9)
> (In reply to Fedora Update System from comment #7)
> > unoconv-0.6-10.fc20 has been submitted as an update for Fedora 20.
> 
> Still no dice, I am afraid.  On the first attempt I got an error message
> which I did not see up to now.  Namely:
> 
> Error: Unable to connect or start own listener. Aborting.

unoconv internally starts soffice and then waits for a set time (default is 6 seconds, changeable via -T) for the communication socket to appear. If it does not, unoconv fails. Apparently 6 seconds is not enough when libreoffice has to regenerate extension cache after a new extension has been installed. Anyway, this is not a bug.

> 
> Subsequent tries brought something in a style similar to error messages
> quoted before but not really the same.  In particular 
> "org.openoffice.da.writer2latex" in this seems to be new and an error code
> is different.  The whole thing is like this:
> 
> Unable to store document to file:///var/tmp/some_file.ltx (ErrCode 3088)

Does export of that file from libreoffice work? Because I have no problems doing export to LaTeX with unoconv-0.6-10.

> 
> BTW - unoconv-0.6-10.fc20 dragged in by dependencies quite sizeable
> openoffice.org-diafilter.  Curiosly enough all other "oofice" packages seem
> to start with "libreoffice-".  Was that really intended?

Yes. I decided to add dependencies to all packages that contain an import or export filter for libreoffice.

Comment 11 Michal Jaegermann 2014-04-19 16:37:58 UTC
(In reply to David Tardon from comment #10)
> (In reply to Michal Jaegermann from comment #9)

> > 
> > Unable to store document to file:///var/tmp/some_file.ltx (ErrCode 3088)
> 
> Does export of that file from libreoffice work? Because I have no problems
> doing export to LaTeX with unoconv-0.6-10.

Yes, works just fine.  This is one of two sample files I tried yesterday.  The one with just a "straight text" in it.

Whatever that is doing I am not going to loose my sleep over it.  Still I wonder why it refuses to work for me while apparently you have no issues?

I tried to touch an output file just to provide something to overwrite.  It had no visible effects.

Comment 12 Fedora Update System 2014-04-20 01:26:47 UTC
Package unoconv-0.6-10.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing unoconv-0.6-10.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5381/unoconv-0.6-10.fc19
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2014-04-28 04:52:05 UTC
unoconv-0.6-10.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2014-04-28 04:52:14 UTC
unoconv-0.6-10.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Michal Jaegermann 2014-04-28 14:43:56 UTC
(In reply to Fedora Update System from comment #14)
> unoconv-0.6-10.fc20 has been pushed to the Fedora 20 stable repository.  If
> problems still persist, please make note of it in this bug report.

Like I wrote in comment #9 "ErrCode 3088" persists with unoconv-0.6-10.fc20 and that is about it.

Comment 16 David Tardon 2014-04-28 16:46:26 UTC
(In reply to Michal Jaegermann from comment #15)
> (In reply to Fedora Update System from comment #14)
> > unoconv-0.6-10.fc20 has been pushed to the Fedora 20 stable repository.  If
> > problems still persist, please make note of it in this bug report.
> 
> Like I wrote in comment #9 "ErrCode 3088" persists with unoconv-0.6-10.fc20
> and that is about it.

The original error code was 2074, which is ERRORCODE_IO_INVALIDPARAMETER in libreoffice. 3088 is ERRORCODE_IO_CANTWRITE. That suggests that your current problem is not in unoconv / libreoffice.

Comment 17 Michal Jaegermann 2014-04-28 17:43:49 UTC
(In reply to David Tardon from comment #16)
> (In reply to Michal Jaegermann from comment #15)
> > 
> > Like I wrote in comment #9 "ErrCode 3088" persists with unoconv-0.6-10.fc20
> > and that is about it.
> 
> The original error code was 2074, which is ERRORCODE_IO_INVALIDPARAMETER in
> libreoffice. 3088 is ERRORCODE_IO_CANTWRITE. That suggests that your current
> problem is not in unoconv / libreoffice.

I very strongly believe that you are mistaken.  Even if I had no idea what 3088 may mean in testing I took care that results go to writeable locations and with enough of a disk space.  Moreover I tried today the same tests, with the same input files, on another machine with an updated unoconv-0.6-10.fc20.  There, for a change, sometimes these conversions do happen and sometimes, on the same operation, I am getting "ErrCode 3088" with no way to predict an outcome.  It smells to me like a race and/or miscommunication somewhere.  When conversions happen to work results are sane.


Note You need to log in before you can comment on or make changes to this bug.