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

Converting filenames with non-ascii characters (ErrCode 2074) #18

Closed
NDakotaBE opened this issue Jan 4, 2012 · 16 comments
Closed

Converting filenames with non-ascii characters (ErrCode 2074) #18

NDakotaBE opened this issue Jan 4, 2012 · 16 comments

Comments

@NDakotaBE
Copy link

As I am trying to export doc files to jpeg I get the following error.

I have restarted all my instances of openoffice, reinstalled everything, but still the same issue.
Any idea what the reason is as I am on a dead end

Input file: EWAD-CZ_press_release.doc
Selected output format: Joint Photographic Experts Group [.jpg]
Selected ooffice filter: draw_jpg_Export
Used doctype: graphics
unoconv: UnoException during conversion in <class __main__.com.sun.star.task.ErrorCodeIOException at 0x7f1e302f0590>:
ERROR: The provided document cannot be converted to the desired format. (code: 2074)
@dagwieers
Copy link
Member

I wonder if you get the same problem when converting this DOC to PDF ?

The LibreOffice (and OpenOffice) error-codes are ciphered inside this document:

http://cgit.freedesktop.org/libreoffice/core/tree/tools/inc/tools/errcode.hxx
http://cgit.freedesktop.org/libreoffice/core/tree/svtools/inc/svtools/sfxecode.hxx
http://cgit.freedesktop.org/libreoffice/core/tree/svtools/inc/svtools/soerr.hxx

Which means:

Area: 0 (ERRCODE_AREA_TOOLS)
Class: 8 (ERRCODE_CLASS_PARAMETER)
Code: 26 (ERRCODE_IO_INVALIDPARAMETER)

Looking for the combination of 2074 and ERRCODE_IO_INVALIDPARAMETER gives some hints to what the cause(s) could be. It might be caused by unoconv, or by the input file. Is there a way to reproduce this ?

@dagwieers
Copy link
Member

Still not sure what 2074 means in this case, but I noticed I couldn't convert an ODT or a DOC directly to JPG either, but it does work by first converting to PDF and then converting to JPG. Same for PNG, which is weird as I remember this use-case to have worked before ?

The error is caused by document.storeToURL() and does not seem influenced by the output properties. Fails both on OpenOffice 3.2.1 as well as LibreOffice 3.4.4 :-/

@NDakotaBE
Copy link
Author

Hello Dag,

I can convert doc to pdf, but cannot convert them to jpg directly as in your case.

But still I cannot convert ppt / pptx to pdf as middle step to convert them to jpg as target.

Any idea on how to solve?

Thanks!

@dagwieers
Copy link
Member

Not really, the issue is the 2074 ErrCode, if we know what the cause is of that we know how to fix it.

Unfortunately the error is not very specific and only one of the developers can help understand what is going on.

@NDakotaBE
Copy link
Author

Should I investigate what the errCode means, or will you ?

We're planning to use UnoConv on a corporate and daily basis, so it would be important to have this fix asap.

Thanks anyway

@dagwieers
Copy link
Member

The problem is that I am afraid that this ErrCode can have more than one cause. I don't know how to find the real cause in this case. I think you have to turn to the LibreOffice developers, however I don't know who would be able to help with this :-/

I have reported this before on the list.

@NDakotaBE
Copy link
Author

I have tried JODConverter as our developers are using this tool on a Windows box and this resolves in the same issue.

Is this a *UNIX OO specific problem?

@dagwieers
Copy link
Member

Have you tried unoconv on Windows ? Just to make sure this is not a unoconv induced problem afterall ?

@NDakotaBE
Copy link
Author

I have no access to a windows host, so I cannot try this.

@NDakotaBE
Copy link
Author

Any news?

@dagwieers
Copy link
Member

Not really. Yesterday we made some fixes for unoconv on Windows and I discovered that 2074 also can happen when you are trying to convert using an export filter that does not exist (e.g. try doing fodt on OpenOffice 3.2). Maybe I am using an incorrect filter somewhere. Time to investigate JODConverter !

@sniffer
Copy link

sniffer commented Feb 27, 2012

I ran this today on EL5 and experienced the same error while converting odt to xhtml. The thing was that I was missing package: openoffice.org-xsltfilter.x86_64. After installing everything ran smoothly.

Just remember that if running headleass, make sure to kill openoffice daemon after installing the missing package

Hope this helps. Cheers.

@dagwieers
Copy link
Member

I have updated the documentation to reflect that killing existing instances may fix problems. I should also add that installing more libreoffice sub-packages might be necessary too. Thanks for reporting !

@metalman
Copy link

metalman commented May 7, 2012

Sorry. But I find that filename with no extension may raise 2074 Error just now.

env:
Arch Linux
LibreOffice 3.5.2
unoconv 0.4

$ file mytest.ppt
mytest.ppt: Composite Document File V2 Document, Little Endian, Os: Windows, Version 1.0, Code page: -535, Title: \370I\022\336\313\177, Comments: \370I\022\336\313\177, Template: \370I\022\336\313\177, Revision Number: 1, Create Time/Date: Fri May  4 10:32:58 2012
$ unoconv -T 4 -f jpg -e impress_jpg_Export=true -o mytest.jpg mytest.ppt

Everything is OK.

$ cp mytest.ppt mytest_no_ext
$ unoconv -T 4 -f jpg -e impress_jpg_Export=true -o mytest_no_ext.jpg mytest_no_ext
unoconv: UnoException during conversion in <class '__main__.com.sun.star.task.ErrorCodeIOException'>: 
ERROR: The provided document cannot be converted to the desired format. (code: 2074)

Then I create a symbolic link.

$ ln -s mytest_no_ext mytest_no_ext.ppt
$ unoconv -T 4 -f jpg -e impress_jpg_Export=true -o mytest_no_ext.jpg mytest_no_ext.ppt

Everything is OK again.

The filename of input file may effect LibreOffice/OpenOffice.org uno converter.
This maybe only happens when converting .ppt file to image file.

If the file path of input file has un-ASCII characters 2074 Error may raise too.

Hope this helps. Thanks for unoconv!

@dagwieers dagwieers reopened this Aug 7, 2012
@dagwieers
Copy link
Member

Let's track this problem ! Thanks for reporting back the details. I am going to modify the issue's title !

@dagwieers
Copy link
Member

I can no longer reproduce this with recent LibreOffice versions. So I assume this is fixed upstream.

Can you please try again with the latest unoconv version from the master branch and a recent LibreOffice ? If you still have a problem, feel free to reopen this issue.

@dagwieers dagwieers changed the title Error 2074 when converting filenames with non-ascii characters Converting filenames with non-ascii characters (ErrCode 2074) Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants