Bug 748269 - [abrt] unoconv-0.4-4.fc15: uno.py:318:_uno_struct__getattr__:AttributeError: ErrCode
Summary: [abrt] unoconv-0.4-4.fc15: uno.py:318:_uno_struct__getattr__:AttributeError: ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: unoconv
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Tardon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b4a67db5696d9f21cc65c958e20...
: 709066 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-23 17:59 UTC by Antonio T. (sagitter)
Modified: 2013-02-14 11:39 UTC (History)
13 users (show)

Fixed In Version: unoconv-0.6-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-14 01:12:00 UTC
Type: ---


Attachments (Terms of Use)

Description Antonio T. (sagitter) 2011-10-23 17:59:08 UTC
libreport version: 2.0.6
abrt_version:   2.0.4.981
cmdline:        /usr/bin/python /usr/bin/unoconv -f odt install.abw
comment:        Trying to convert .abw file (abiword) to odt file format.
executable:     /usr/bin/unoconv
kernel:         3.0.1-3.fc16.x86_64
reason:         uno.py:318:_uno_struct__getattr__:AttributeError: ErrCode
time:           Sun Oct 23 19:57:03 2011
uid:            1000
username:       verne

backtrace:
:uno.py:318:_uno_struct__getattr__:AttributeError: ErrCode
:
:Traceback (most recent call last):
:  File "/usr/bin/unoconv", line 801, in <module>
:    main()
:  File "/usr/bin/unoconv", line 780, in main
:    convertor.convert(inputfn)
:  File "/usr/bin/unoconv", line 690, in convert
:    error("ERROR: The provided document cannot be converted to the desired format. (code: %s)" % e.ErrCode)
:  File "/usr/lib64/python2.7/site-packages/uno.py", line 318, in _uno_struct__getattr__
:    return __builtin__.getattr(self.__dict__["value"],name)
:AttributeError: ErrCode
:
:Local variables in innermost frame:
:self: File could not be loaded by OpenOffice
:name: 'ErrCode'

Comment 1 Caolan McNamara 2011-10-24 10:51:10 UTC
Is this simply because LibreOffice/OpenOffice.org can't import abiword, i.e. it literally is "The provided document cannot be converted to the desired format."

Comment 2 Antonio T. (sagitter) 2011-10-24 11:35:13 UTC
>Is this simply because LibreOffice/OpenOffice.org can't import abiword, i.e. it
>literally is "The provided document cannot be converted to the desired format."

Why ?

Abiword and OpenOffice are both free software. 
Moreover, OpenOffice uses standard document format.

Comment 3 David Tardon 2011-10-24 12:12:58 UTC
(In reply to comment #2)
> >Is this simply because LibreOffice/OpenOffice.org can't import abiword, i.e. it
> >literally is "The provided document cannot be converted to the desired format."
> 
> Why ?
> 
> Abiword and OpenOffice are both free software. 
> Moreover, OpenOffice uses standard document format.

But Abiword does not :) And LibreOffice cannot import .abw . Of course, both are free software, so we accept patches to LibreOffice to correct the situation :)

The only bug there is that unoconv should not crash in such situation.

Comment 4 Antonio T. (sagitter) 2011-10-24 16:40:56 UTC
Ok, thank you.

Comment 5 Stephan Bergmann 2011-10-24 20:27:22 UTC
The problem appears to be with unoconv.  At least the version I found on the net (<http://github.com/dagwieers/unoconv>) has code

  from com.sun.star.uno import Exception as UnoException
  [...]
  except UnoException, e:
    error("unoconv: UnoException during conversion in %s: %s" % (repr(e.__class__), e.Message))
    error("ERROR: The provided document cannot be converted to the desired format. (Error code %s)" % e.ErrCode)
    exitcode = e.ErrCode

that tries to read the value of a non-existing ErrCode member of a com.sun.star.uno.Exception.  (A UNO exception type that does have an ErrCode member is com.sun.star.task.ErrorCodeIOException; maybe that was meant instead.  Will contact Dag Wieers.)

Comment 6 José Antonio 2011-11-05 21:52:50 UTC
Package: unoconv-0.4-4.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
Gnome-Documents is unable to handle any OpenOffice/LibreOffice document.

Comment 7 Heiko Adams 2011-11-08 21:20:38 UTC
Package: unoconv-0.4-4.fc15
Architecture: i686
OS Release: Fedora release 16 (Verne)

Comment
-----
Trying to open an odt file with gnome-documents as preview

Comment 8 Iván Jiménez 2011-11-09 11:34:35 UTC
Package: unoconv-0.4-4.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
open a word document in gnome-documents

Comment 9 kotofos 2011-12-26 16:51:17 UTC
input files is not exist

rating: (null)
Package: unoconv-0.4-4.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment 10 phirestalker 2011-12-28 04:16:49 UTC
I ran the command on a file to convert to pdf and I got this error

rating: (null)
Package: unoconv-0.4-4.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment 11 phirestalker 2011-12-28 04:47:32 UTC
the file was an odt file by the way, certainly unoconv supports odt files??

Comment 12 Christopher Svanefalk 2012-01-08 21:22:56 UTC
Tried to convert from odp to pdf with following command:

unoconv --doctype=presentation --format=pdf 01\ Project\ Overview.ppt


Package: unoconv-0.4-4.fc15
Architecture: i686
OS Release: Fedora release 16 (Verne)

Comment 13 Dag Wieers 2012-01-09 07:46:45 UTC
I improved the code to show an ErrCode only when there is one available. I also improved the documentation and manual to give instructions on how to convert to ErrCode to something sensible, hopefully this helps us find when a failing conversion is caused by unoconv or by LibreOffice.

The changes are available from:

    http://github.com/dagwieers/unoconv

Feedback is appreciated.

Comment 14 phirestalker 2012-01-09 20:37:06 UTC
I believe that my errors are caused by libreoffice. I was able to get it to work by opening writer and then running the command again. Somehow it is unable to start libreoffice in the background on its own??

Comment 15 Dag Wieers 2012-02-07 13:34:33 UTC
I'd like to learn under what conditions this is the case.

Also, if you could do your test again with the latest release from Github, I would appreciate it. I'd like to release this as 0.5.

BTW This release also fixes the change in LibreOffice options (where before it was eg. -headless, it now is --headless if you want to avoid warnings).

Comment 16 kotofos 2012-02-09 09:27:26 UTC
try convert not existed file

[kotofos@kotofos-laptop ~]$ unoconv -f pdf dsf.odt
unoconv: file `dsf.odt' does not exist.
unoconv: UnoException during conversion in <class '__main__.com.sun.star.lang.IllegalArgumentException'>: URL seems to be an unsupported one.
Traceback (most recent call last):
  File "/usr/bin/unoconv", line 801, in <module>
    main()
  File "/usr/bin/unoconv", line 780, in main
    convertor.convert(inputfn)
  File "/usr/bin/unoconv", line 690, in convert
    error("ERROR: The provided document cannot be converted to the desired format. (code: %s)" % e.ErrCode)
  File "/usr/lib64/python2.7/site-packages/uno.py", line 318, in _uno_struct__getattr__
    return __builtin__.getattr(self.__dict__["value"],name)
AttributeError: ErrCode


Package: unoconv-0.4-4.fc15
OS Release: Fedora release 16 (Verne)

Comment 17 kotofos 2012-02-09 10:21:41 UTC
start Writter
try convert file 
[kotofos@kotofos-laptop Documents]$ unoconv -f pdf dropped\ text\ 2.txt 
Error: Unable to connect or start own listener. Aborting.

Package: unoconv-0.4-4.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment 18 Caolan McNamara 2012-02-09 11:37:48 UTC
*** Bug 709066 has been marked as a duplicate of this bug. ***

Comment 19 Dag Wieers 2012-02-09 13:16:44 UTC
Could you please try the latest version from Github ? We fixed a load of issues in the upcoming 0.5 release, improving the error output, etc... Fixing 0.4 is no longer an option if 0.5 is around the corner. We just need sufficient testing to make sure we don't have any regressions.

Comment 20 kotofos 2012-02-17 20:06:46 UTC
version fron git
./unoconv -f pdf WISHLIST1
unoconv: file `WISHLIST1' does not exist.
UNO IllegalArgument during import phase: Source file cannot be read. URL seems to be an unsupported one.

Comment 21 Fedora End Of Life 2013-01-16 22:39:12 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 22 Fedora End Of Life 2013-02-14 01:12:10 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 23 Stephan Bergmann 2013-02-14 11:39:46 UTC
(In reply to comment #20)
> version fron git
> ./unoconv -f pdf WISHLIST1
> unoconv: file `WISHLIST1' does not exist.
> UNO IllegalArgument during import phase: Source file cannot be read. URL
> seems to be an unsupported one.

This behavior is seen with unoconv-0.6-1.fc19 now.


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