Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386481 - app-office/unoconv-20110923 still doesn't work with app-office/libreoffice-bin-3.4.3-r2
Summary: app-office/unoconv-20110923 still doesn't work with app-office/libreoffice-bi...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-09 01:25 UTC by Rafael
Modified: 2012-04-03 12:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael 2011-10-09 01:25:25 UTC
I installed app-office/unoconv-20110923 and it doesn't work with
app-office/libreoffice-bin-3.4.3-r2. It gives me this error message: 
unoconv: Cannot find the soffice binary in sys.path and known paths.
ERROR: Please locate this binary and send your feedback to:
<tools@lists.rpmforge.net>.


Reproducible: Always





In my machine, 'soffice.bin' is inside '/usr/lib64/libreoffice/program/'.
Looking at the code in /usr/bin/unoconv I couldn't find any reference to this
path. Instead, it has a reference to '/opt/libreoffice/program'.

I tried to add the path '/usr/lib64/libreoffice/program/' to extrapaths, like
this:


extrapaths = glob.glob('/usr/lib*/libreoffice*/basis*/program') + \
             glob.glob('/opt/libreoffice/program') + \
             glob.glob('/usr/lib*/libreoffice/program') + \
             glob.glob('/usr/lib*/openoffice*/program') + \
             glob.glob('/usr/lib*/openoffice*/basis*/program') + \
             glob.glob('/usr/lib*/ooo*/program') + \
             glob.glob('/usr/lib*/ooo*/basis*/program') + \
             glob.glob('/usr/local/openoffice*/program') + \
             glob.glob('/usr/local/openoffice*/basis*/program') + \
             glob.glob('/usr/local/ooo*/program') + \
             glob.glob('/usr/local/ooo*/basis*/program') + \
             glob.glob('/opt/openoffice*/program') + \
             glob.glob('/opt/openoffice*/basis*/program') + \
             glob.glob('/Applications/OpenOffice.org.app/Contents/program') + \
            
glob.glob('/Applications/OpenOffice.org.app/Contents/basis-link/program') + \
             glob.glob('/Applications/NeoOffice.app/Contents/program') + \
            
glob.glob('/Applications/NeoOffice.app/Contents/basis-link/program') + \
             glob.glob('/usr/bin') + \
             glob.glob('/usr/local/bin') + \
             glob.glob('/opt/bin')


But then I got the following error:

Traceback (most recent call last):
  File "/usr/bin/unoconv", line 814, in <module>
    main()
  File "/usr/bin/unoconv", line 790, in main
    convertor = Convertor()
  File "/usr/bin/unoconv", line 519, in __init__
    info(3, "Existing listener not found.\n%s" % e)
  File "/usr/lib/libreoffice/basis3.4/program/uno.py", line 323, in
_uno_struct__repr__
    return repr(self.__dict__["value"])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-25:
ordinal not in range(128)

Then I remenbered that libreoffice-bin has a bundled copy of python. Then I
changed the shebang in '/usr/bin/unoconv' to:

#!/usr/lib64/libreoffice/program/python

This made unoconv work for me.

--

The only problem I have after these modifications are the following messages:

Warning: -headless is deprecated.  Use --headless instead.
Warning: -invisible is deprecated.  Use --invisible instead.
Warning: -nodefault is deprecated.  Use --nodefault instead.
Warning: -nofirststartwizard is deprecated.  Use --nofirststartwizard instead.
Warning: -nologo is deprecated.  Use --nologo instead.
Warning: -norestore is deprecated.  Use --norestore instead.
Warning: -accept=socket,host=localhost,port=2002;urp;StarOffice.ComponentContext is deprecated.  Use --accept=socket,host=localhost,port=2002;urp;StarOffice.ComponentContext instead.
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2011-10-19 10:39:13 UTC
Patches welcome to be submitted to upstream.

Same goes for the deprecation warnings, this is not for us to fix.

I actually never tried the UNO bridge on the binary package but it is quite possible that it would be broken wrt system integration.

Since you have 64b install try to use libreoffice-bin-3.4.3.2-r1, that one should work peachy :)
Comment 2 David E. Narváez 2011-11-07 05:10:57 UTC
I droppped libreoffice-bin in favor of libreoffice, tried unoconv and it didn't work, saying it required the UNO python bindings. I then enabled python USE flag in libreoffice and unoconv was able to find the pyuno library but still has the following issues:

1. Will not connect to the UNO bridge on the first try (upstream bug #7[0])
2. Once you connect to the UNO bridge, you eventually get

Traceback (most recent call last):
  File "/usr/bin/odt2pdf", line 813, in <module>
    main()
  File "/usr/bin/odt2pdf", line 789, in main
    convertor = Convertor()
  File "/usr/bin/odt2pdf", line 555, in __init__
    self.desktop = unosvcmgr.createInstanceWithContext("com.sun.star.frame.Desktop", unocontext)
uno.RuntimeException: Binary URP bridge disposed during call

I wonder if, for starters, we could make sure there's libreoffice with Pyhton bindings (be it from libreoffice-bin or libreoffice [python]) before installing unoconv. After that, I think I should take Issue 2 above to upstream, so I'll try to reproduce it in another environment too.

[0] https://github.com/dagwieers/unoconv/issues/7
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-27 16:31:08 UTC
I added new version of unoconv to cvs. Could you please test it and reopen if the issue is still present for you?
Comment 4 David E. Narváez 2012-04-03 12:10:22 UTC
Well, now unoconv is broken upstream but after fixing an issue there, everything works good on libreoffice's side, so this bug can RIP. Thanks Tomáš!