-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unoconv not working #61
Comments
Did you try it with any other files ? Can you share the file so I can test it on my system ? |
Thank you, for your reply. I had been trying to convert one particular .ppt file which was prepared by one of our clients. It seems there is some problem with the file itself. When I tried the process for other files, the conversion went on smooth. Also previously the conversion was not working for other .ppt files too, which i now figured out that the problem was with my app's environment. I have been able to fix it too. So now unoconv happily works for those files too. Thank you. |
@LionSher: Do you mean it is fixed now ? Can you shed a light on what you changed in your environment to make it work so we can improve the documentation ? Thanks in advance. |
I am not sure if the problem was with unoconv. Let me explain. In my local machine I ran my app in development mode with Webrick server as: But unoconv gave me problem when I had my app running on Nginx-Passenger which was in production mode on Rackspace server where my /opt/nginx/conf/nginx.conf file had 'rails_env' parameter set to 'production'. This was where my ppts were not getting converted. Even after trying out all the solutions as I had mentioned, it didn't work. So I just changed 'rails_env' parameter to 'development' in my /opt/nginx/conf/nginx.conf file and now unoconv is running perfectly. |
I had the same problem. I had to kill a dead process of |
killing soffice.bin fixed my issue as well |
@visionmedia This is one of the steps of the troubleshooting section of the README. |
yeah, glad it's working now, dependency hell <3 |
something in our vm must have changed, it's no longer working, even after killing soffice.bin this time. looking into it..
|
got it working again |
@visionmedia I would upgrade to v0.6 which fixes a lot of unrelated items from your output as well... |
I am using unoconv with no X display. I did: $ sudo apt-get install openoffice.org xvfb $ xvfb-run -a /usr/lib/libreoffice/program/soffice -headless -nologo -norestore -nofirststartwizard $ sudo apt-get install unoconv Then I converted different documents. I have problem with only one file ( http://fs01n4.sendspace.com/dl/15b0ce8bf0fcb31a330282361e414dd0/520e0aa80c7529e2/luqbs4/f.rtf ): $ unoconv -f html f.rtf 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. unoconv: UnoException during conversion in : Binary URP bridge disposed during call Traceback (most recent call last): File "/usr/bin/unoconv", line 790, in main() File "/usr/bin/unoconv", line 769, in main convertor.convert(inputfn) File "/usr/bin/unoconv", line 679, in convert error("ERROR: The provided document cannot be converted to the desired format. (code: %s)" % e.ErrCode) File "/usr/lib/python2.7/dist-packages/uno.py", line 320, in _uno_struct__getattr__ return __builtin__.getattr(self.__dict__["value"],name) AttributeError: ErrCode This is additional info: $ unoconv --version unoconv 0.4 Written by Dag Wieers Homepage at http://dag.wieers.com/home-made/unoconv/ platform posix/linux2 python 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1] build revision $Rev$ $ apt-cache policy libreoffice libreoffice: Installed: 1:3.4.4-0ubuntu1.4 Candidate: 1:3.4.4-0ubuntu1.4 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.10 Release: 11.10 Codename: oneiric |
I have been trying to fix this issue for a long time now but unable to figure out the fix. Please help.
$ unoconv -f pdf presentation_39.ppt
unoconv: UnoException during conversion in <class 'main.com.sun.star.lang.IllegalArgumentException'>: Unsupported URL file:///home/kern/my_rails_app/public/data/presentation_39/presentation_39.ppt: ""
Traceback (most recent call last):
File "/usr/bin/unoconv", line 790, in
main()
File "/usr/bin/unoconv", line 769, in main
convertor.convert(inputfn)
File "/usr/bin/unoconv", line 679, in convert
error("ERROR: The provided document cannot be converted to the desired format. (code: %s)" % e.ErrCode)
File "/usr/lib/python2.7/dist-packages/uno.py", line 337, in uno_struct__getattr_
return builtin.getattr(self.dict["value"],name)
AttributeError: ErrCode
So, i downloaded unoconv-0.5.tar.bz2 from https://github.com/dagwieers/unoconv/downloads, and extracted it in my rails app's public folder. Then i got this error:
$ /home/kern/my_rails_app/public/unoconv-0.5/unoconv -f pdf presentation_39.ppt
UNO IllegalArgument during import phase: Source file cannot be read. Unsupported URL file:///home/kern/my_rails_app/public/data/presentation_39/presentation_39.ppt: ""
Then i gave UNO_PATH= parameter as follows:
$ UNO_PATH=/usr/lib/libreoffice /home/kern/my_rails_app/public/unoconv-0.5/unoconv -f pdf presentation_39.ppt
UNO IllegalArgument during import phase: Source file cannot be read. Unsupported URL file:///home/kern/my_rails_app/public/data/presentation_39/presentation_39.ppt: ""
NOTE: i do not have libreoffice path at /opt/libreoffice3.5 as mentioned in #47
NOTE: I have tried the above with unoconv listener also as foolows:
$ unoconv --listener &
[1] 31574
$ ps -ef
root 31574 31503 3 07:27 pts/4 00:00:00 /usr/bin/python /usr/bin/unoconv --listener
The ppt file has 777 permissions as follows:
$ ls -l
total 260
-rwxrwxrwx 1 kern kern 258560 Jun 25 08:17 presentation_39.ppt
I have the following on my ubuntu 12.04 LTS 64-bit machine:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
$ apt-cache policy libreoffice
libreoffice:
Installed: 1:3.5.3-0ubuntu1
Candidate: 1:3.5.3-0ubuntu1
$ apt-cache policy unoconv
unoconv:
Installed: 0.4-1
Candidate: 0.4-1
NOTE: i have tried to search for libreoffice-pyuno or libobasis3.5-pyuno for which i get:
$ apt-cache policy libreoffice-pyuno
N: Unable to locate package libreoffice-pyuno
N: Couldn't find any package by regex 'libreoffice-pyuno'
NOTE: i have python-uno
The text was updated successfully, but these errors were encountered: