Page 1 of 1

[Solved] Read Error: can't open ODT text file

Posted: Mon Oct 22, 2018 2:31 am
by Bruce Grabow
Hello,
I have seen this problem before, but am not knowledgeable enough to resolve it myself. My odt text file won't open. I get: Read Error: format error discovered in the file in sub-document content.xml at 2,3848

It was most likely caused by docx using multiple comments, then saving as a odt file.

Any suggestions would be most appreciated.

Bruce

SOLVED

Re: Read Error: can't open ODT text file

Posted: Mon Oct 22, 2018 4:29 am
by FJCC
Try this version. There are a lot of comments and recorded changes. You might try accepting all of the changes and proceeding with that version. When I did Save As to create this version it got corrupted again, so I suspect you will have the same problem if you make edits and save the document.

Re: Read Error: can't open ODT text file

Posted: Mon Oct 22, 2018 4:54 am
by Bruce Grabow
Thank you FJCC,

It works well enough to save the text. You are right, the heavy use of comments, etc., still cause it to crash, so I am using a "clean" copy and all is well.

Excellent work, much appreciated.

Bruce G.

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Mon Oct 22, 2018 10:39 am
by John_Ha
Be careful if you are sending a .odt file to an MS Word user for them to add comments etc.

MS Word seems to corrupt .odt files. Take care they do not insert a "comment attached to a string of characters" which is what usually goes wrong. Comments located at a point in text are OK.

See Item 10 in [Tutorial] Differences between Writer and MS Word files for more information.

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Mon Oct 22, 2018 11:34 am
by John_Ha
I have now looked at the file and it appears to be classic MS Word corruption where multiple "office:name" definitions with long strings of "1111111" have incorrectly been inserted into the first (P1) paragraph style definition, corrupting it and preventing the file from opening.
Clipboard02.gif
There are many such reports in the forum.

Ask your reviewer not to attach comments to range of text characters. Also ask them to file a bug report with Microsoft.
Clipboard03.gif

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 12:47 am
by larisasews
Wanted to update - there was a post about file options and "show hidden files" I was actually able to find an version of one of the files that she needed by doing that and saving it under another name. It's not everything she lost, but at least it was something. Thank you for reading and letting me know the original file was completely horked up. I made her clear her desktop, delete unneeded files, and I think she ran a defrag last night. Her dad will be taking a look at the computer because she has a lot of things running in the background that she doesn't need....hopefully all that, plus making sure she has auto-save turned on will avoid this in the future.....again, thanks for responding and letting me know (I'm self-taught on computers so don't really know that much and even though we couldn't get it back, that was something I never knew).

REALLY hoping someone can help as I'm trying to read through all of the posts but getting more and more confused by the minute. Daughter has worked on an assignment for a few days now and it saved/opened just fine earlier today. She just tried to open it again and it needed to be recovered - yet there are no previous versions showing up. When she tries to open the version that it says is saved, all the text has been converted to "######" and she gets the ASCII Filter Options of:

Character Set: Western Europe (Windows-1252/WinLatin 1)

Default Language: Times New Roman

Language: English (USA)

Paragraph break: Cr& LF


Basically neither of us can find anything that would bring this back and really hope someone in the board can assist. I'm going to continue reading through everything, but she's in tears over everything that she lost since it is part of her English class and needs to be submitted for a grade.


Thank you so much for any help that you may be able to give!

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 9:01 am
by RoryOF
The file is damaged beyond repair, with no usable content.

The file has been damaged, perhaps because of over hasty close down of the computer before internal housekeeping was complete. Examination will show that there is nothing usable in the damaged file.

Please see [Tutorial] How to find and un-delete Writer temporary files for ways to try and recover any temporary Writer files that may still be on the computer.

If that doesn't help, then as soon as possible do the following:

Download Recuva or PhotoRec (only one needed) and let it do an indepth recovery of deleted files on the computer. You may get a file containing some or all of the data (or not). Do this as a first priority; other use of the computer may overwrite any existing but deleted files and prevent their recovery. There is no guarantee that you will recover anything useful. You may need to rename any such files to type .odt.

Do the above soonest!

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 11:25 am
by John_Ha
This file is extremely strange and I have never seen one like it before.

Normally, a file which opens and shows nothing but ###### characters occurs because the .odt file has not been written correctly, is not a ZIP file, and is instead a file full of NUL characters. When AOO opens such a file, it sees it as a flat ASCII file, offers the ASCII filter pop-up, and displays the NUL characters as #.

This file is completely different. It is a well structured ZIP file and it opens properly.
Clipboard01.gif
The file content.xml is well structured and has all the normal meta-data. However, the user text in content.xml is a long string of #####! So, it is as though the user has deleted the original user text and replaced it with ######. This interpretation is supported by the presence of the <text:soft-page-break/> tags, which Writer inserts to create a page break. So it appears as though a long, continuous string of # characters has been typed and Writer has added the <text:soft-page-break/> tags when the text reaches the end of the page.

A possible scenario is

1 Press Ctrl+A >>> This selects everything in the document
2 Press and hold the # key >>> This deletes all the text and inserts the string of # characters. Writer inserts the <text:soft-page-break/> tags to display it correctly.
3 Save the file.

We have a cat which is astonishingly adept at Step 2 ...

There is, as Rory says, nothing recoverable from the file itself. Follow the tutorial to undelete previous versions of the file, or temporary files.

This is content.xml - note there are no paragraph breaks so scroll to the right to see all the ######.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:textooo="http://openoffice.org/2013/office" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2">
	<office:scripts/>
	<office:font-face-decls>
		<style:font-face style:name="Times New Roman1" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman"/>
		<style:font-face style:name="Arial2" svg:font-family="Arial" style:font-family-generic="swiss"/>
		<style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
		<style:font-face style:name="NSimSun" svg:font-family="NSimSun" style:font-family-generic="modern" style:font-pitch="fixed"/>
		<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
		<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
		<style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="system" style:font-pitch="variable"/>
		<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
		<style:font-face style:name="SimSun" svg:font-family="SimSun" style:font-family-generic="system" style:font-pitch="variable"/>
	</office:font-face-decls>
	<office:automatic-styles/>
	<office:body>
		<office:text text:use-soft-page-breaks="true">
			<text:sequence-decls>
				<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
			</text:sequence-decls>
			<text:p text:style-name="Preformatted_20_Text">##############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<text:soft-page-break/>#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################</text:p>
			<text:p text:style-name="Preformatted_20_Text">#############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<text:soft-page-break/>##############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<text:soft-page-break/>####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################</text:p>
			<text:p text:style-name="Preformatted_20_Text">##########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<text:soft-page-break/>############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################</text:p>
		</office:text>
	</office:body>
</office:document-content>

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 11:36 am
by RoryOF
As you say, John. It showed three "paragraphs" in style "Preformatted text"; This is strange, as "Text body" would be a more usual style.

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 11:49 am
by John_Ha
I created this file (I used a very small page size) by holding down the # key. content.xml is similar to the above, but not identical - in particularly the "preformatted text" tag is missing.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:textooo="http://openoffice.org/2013/office" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2">
	<office:scripts/>
	<office:font-face-decls>
		<style:font-face style:name="Mangal1" svg:font-family="Mangal"/>
		<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
		<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
		<style:font-face style:name="Mangal" svg:font-family="Mangal" style:font-family-generic="system" style:font-pitch="variable"/>
		<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
		<style:font-face style:name="SimSun" svg:font-family="SimSun" style:font-family-generic="system" style:font-pitch="variable"/>
	</office:font-face-decls>
	<office:automatic-styles/>
	<office:body>
		<office:text text:use-soft-page-breaks="true">
			<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
			<text:sequence-decls>
				<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
			</text:sequence-decls>
			<text:p text:style-name="Standard">####################################################################################<text:soft-page-break/>####################################################################################<text:soft-page-break/>##################################</text:p>
		</office:text>
	</office:body>
</office:document-content>

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 11:56 am
by RoryOF
The "Preformatted text" tag suggests to me that the content of the file may have been constructed by Pasting from some other source. If this is the case, a rebuild of the missing content ought be quick and easy.

As an aside, it is important that when an important file is refuses to open correctly, such file should be copied at operating system level and recovery attempted on the copy only, leaving the original untouched in case more experienced recovery methods are required.

Re: [SOLVED] Read Error: can't open ODT text file

Posted: Tue Oct 23, 2018 11:57 am
by John_Ha
I did another test by typing a string of # in Thunderbird and setting it to Preformatted. I then copied it into an empty document. It is still different from the poster's file.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:textooo="http://openoffice.org/2013/office" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2">
	<office:scripts/>
	<office:font-face-decls>
		<style:font-face style:name="Mangal1" svg:font-family="Mangal"/>
		<style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
		<style:font-face style:name="NSimSun" svg:font-family="NSimSun" style:font-family-generic="modern" style:font-pitch="fixed"/>
		<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
		<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
		<style:font-face style:name="Mangal" svg:font-family="Mangal" style:font-family-generic="system" style:font-pitch="variable"/>
		<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
		<style:font-face style:name="SimSun" svg:font-family="SimSun" style:font-family-generic="system" style:font-pitch="variable"/>
	</office:font-face-decls>
	<office:automatic-styles>
		<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">
			<style:paragraph-properties fo:margin-top="0mm" fo:margin-bottom="4.99mm"/>
		</style:style>
	</office:automatic-styles>
	<office:body>
		<office:text text:use-soft-page-breaks="true">
			<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
			<text:sequence-decls>
				<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
				<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
			</text:sequence-decls>
			<text:p text:style-name="P1">##################################################################################################<text:soft-page-break/>##################################################################################################<text:soft-page-break/>##################################################################################################<text:soft-page-break/>##################################################################################################<text:soft-page-break/>####</text:p>
		</office:text>
	</office:body>
</office:document-content>