Skip to content
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

libreoffice silently fails #116

Open
awead opened this issue Oct 13, 2016 · 2 comments
Open

libreoffice silently fails #116

awead opened this issue Oct 13, 2016 · 2 comments

Comments

@awead
Copy link
Contributor

awead commented Oct 13, 2016

Libreoffice returns zero status when it errors:

awead@pooh T $ soffice --invisible --headless --convert-to doc --outdir /. non-existent-file.txt
Error: source file could not be loaded
awead@pooh T $ echo $?
0

Output is directed to STDERR, so maybe we should parse that and raise something?

@rifuentesm
Copy link

Hi, i have the same problem on Ubuntu Server 16.04 when trying to convert files, only the "file could not be loaded". I think its something that is not installed.
The problem was solved installing the complete libreoffice suite (sudo apt-get install libreoffice) not only the "commons" package (sudo apt-get install libreoffice-common).
Hope this helps.

dgcliff added a commit to NEU-Libraries/cerberus that referenced this issue Apr 27, 2017
…ce required for some odd reason, instead of headless. Provision script will need to be updated
muschellij2 added a commit to muschellij2/docxtractr that referenced this issue Jul 12, 2019
@AbhijitManepatil
Copy link

A Python code to resolve issue : Error: source file could not be loaded
following code worked

import subprocess
subprocess.call(['soffice',
                    '--headless',
                    '--convert-to',
                    'docx',                    
                    sourceFileLocation,
                    '--outdir',
                    destiFileLocation
                    ])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants