[Solved] LibreOffice File format error found at SAXParse

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.

[Solved] LibreOffice File format error found at SAXParse

Postby bem » Fri Jan 05, 2018 4:45 pm

Please help!

I spent the past two days working on a non-profit collaborative proposal for funding, and suddenly I've lost the last two-thirds of the document. The following error comes up:

SAXException: [word/document.xml line 2]: Namespace prefix pic on bodyPr is not defined

I am using LibreOffice Version: 5.4.3.2 (x64) and Windows 10.

I have tried to attach it, but it looks to be bigger than the 128 KiB limit.

Any help would be GREATLY appreciated.

Betsy
Last edited by Hagar Delest on Wed Jan 10, 2018 9:13 am, edited 1 time in total.
Reason: tagged solved
Libre Office Version: 5.4.3.2 (x64)
Windows 10
bem
 
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: [Solved] LibreOffice File format error found at SAXParse

Postby RoryOF » Fri Jan 05, 2018 6:19 pm

If you upload the file to a file-sharing site and post the URL here, someone will have a look and see if they can help. I remark that I have not seen that error before in a SAXException message.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29458
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: LibreOffice File format error found at SAXParse

Postby bem » Mon Jan 08, 2018 3:11 pm

Thank you much. I've tried a few things, including changing the file extension name, adding pic to the name of the document, etc but all without luck.

https://drive.google.com/drive/folders/ ... sp=sharing
Libre Office Version: 5.4.3.2 (x64)
Windows 10
bem
 
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Postby RoryOF » Mon Jan 08, 2018 3:21 pm

Both of the included documents open for me using OpenOffice 4.1.5; I've checked out the internal content and my tools indicate that their internal XML is well formed.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29458
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: LibreOffice File format error found at SAXParse

Postby bem » Tue Jan 09, 2018 1:36 pm

As I mentioned, I had tried various things to get the document to reopen correctly, including converting it back to ods format. The document currently has 8 pages, whereas I previously had 17 or so, so I lost a huge amount of work. On the xml document, I still get an error - see attached screen shot.

Thanks
Attachments
libre error.odt
(19.2 KiB) Downloaded 77 times
Libre Office Version: 5.4.3.2 (x64)
Windows 10
bem
 
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Postby Jan_J » Tue Jan 09, 2018 3:49 pm

The screenshot is poor jpeg. I'm not able to recognize type characters.
Much better idea is to use looseless image format for shots, like png.
Second good idea is to attach images directly to the post, instead of embedding them into odt (or doc, rtf, pdf) container.
JJ ∙ http://forum.openoffice.org/pl/
LO (6.1|6.0) ∙ AOO 4.1.5 ∙ Python (3.7|2.7) ∙ Unicode 11 ∙ LᴬTeX 2ε ∙ XML ∙ Unix tools ∙ Linux (2.6|3.x) ∙ Fedora ∙ CentOS ∙ SUSE
Jan_J
 
Posts: 143
Joined: Wed Apr 29, 2009 1:42 pm
Location: Poland

Re: LibreOffice File format error found at SAXParse

Postby bem » Tue Jan 09, 2018 4:22 pm

Sorry about that. I've attached the error screen as a png instead now.

Any hope of getting the missing pages back?

Betsy
Attachments
libre error.png
Libre Office Version: 5.4.3.2 (x64)
Windows 10
bem
 
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Postby John_Ha » Tue Jan 09, 2018 6:00 pm

Try these. I opened both with AOO and saved as .odt files. AOO seems to be able to cope with the error, and presumably does not write the error back in the saved .odt.

 Edit: AOO does not "cope with the error".

Experience with this and similar files has shown that all the user content before the error is displayed OK.

However, all the user content following the error, even well formed content, is not displayed even though it is still present in the document.xml file. If the corrupted .docx file is then saved, all the non-displayed user text is deleted and can never be recovered.

I think that LO used not to be able to open files with these errors but recent versions of LO do what AOO does, namely open the file, report the error, and display everything up to the error. 
Attachments
docx file.odt
(49.06 KiB) Downloaded 76 times
File 1.odt
(44.39 KiB) Downloaded 86 times
Last edited by John_Ha on Mon Jan 21, 2019 3:50 am, edited 1 time in total.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6773
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: LibreOffice File format error found at SAXParse

Postby bem » Tue Jan 09, 2018 9:29 pm

Your assistance is greatly appreciated. However, I am still missing a big chunk of the second half (plus) of the document. The docx document you resent does show almost another page that was otherwise gone. There are nearly 10 more pages missing still however. Is that the best that can be done, or is there still any hope of recovery?

Thanks,
Betsy
Libre Office Version: 5.4.3.2 (x64)
Windows 10
bem
 
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Postby RoryOF » Tue Jan 09, 2018 9:33 pm

I don'y know if this has happened, but I post it as a general warning to others with a similar problem: if you get a SaxParse or other error when trying to open a file, You must not save over the damaged file. Doing so will overwrite the original file with (perhaps) a truncated version of the file. The damaged original file is the file we need to inspect, and hopefully, will be able to repair.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29458
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: LibreOffice File format error found at SAXParse

Postby acknak » Tue Jan 09, 2018 9:50 pm

See if this one works for you; it has 23 pages when I load it in LibO.
Attachments
tb.docx
(187.58 KiB) Downloaded 100 times
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: LibreOffice File format error found at SAXParse

Postby John_Ha » Wed Jan 10, 2018 12:57 am

All the document text and all the comment text from the 186 kB file you uploaded.

If that still doesn't work see [Tutorial] How to find and un-delete Writer temporary files for

a) detailed instructions on how to recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery.
b) how to find previous versions of the file in the folder it is located in, but which have since been deleted.
c) how to un-delete the temporary files Writer wrote while you were editing the file, and then deleted. This will recover your file as it was when you last opened or you last saved it and is probably your best hope.
Attachments
comments.txt
(1.31 KiB) Downloaded 236 times
document.txt
(28.66 KiB) Downloaded 235 times
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6773
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: LibreOffice File format error found at SAXParse

Postby bem » Wed Jan 10, 2018 6:58 am

You're a star - the document is back in its entirety!

Many many thanks. I'll be much more careful with saving as odt unless absolutely necessary.

Betsy
Libre Office Version: 5.4.3.2 (x64)
Windows 10
bem
 
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Postby John_Ha » Wed Jan 10, 2018 1:24 pm

bem wrote:Many many thanks. I'll be much more careful with saving as odt unless absolutely necessary.

You are almost there :-)

Always save as a .odt file. If you need to send someone a .doc create a separate copy. That way, if the .doc is corrupted you still have the good, correct .odt file.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6773
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK


Return to LibreOffice

Who is online

Users browsing this forum: No registered users and 1 guest