Author Topic: Parsing File Error  (Read 817 times)

Michael6

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
Parsing File Error
« on: June 30, 2020, 02:30:41 am »
My file has crashed with no backup... I go to open it and it says "An error occurred while parsing file at line 845, column 70760235: Unexpected". There is a weeks work in this file I am hoping to recover.  Anyone have the ability to recover it from the last autosave or something similar? It would be greatly appreciated!  :o

utnik

  • Hero Member
  • *****
  • Posts: 1473
  • Karma: 17
Re: Parsing File Error
« Reply #1 on: June 30, 2020, 06:44:36 am »
hi michael

is the 'autosave' file showing the same message? – if it does, it might be hard to recover the file.
when you show me the file, i will take a look at it and try to recognize the error. if the damage is small, i might be able to just delete some affected objects. but there's no guarantee, as i'm not a coder and crashes can do strange things…

utnik

p.s.: the combination of 'a week of work' and 'no backup' should lead to the main lesson to be learned from this crash!

AdmFubar

  • Newbie
  • *
  • Posts: 42
  • Karma: 0
  • Scribus User
Re: Parsing File Error
« Reply #2 on: June 30, 2020, 08:57:19 am »
Out of curiosity, how old is the system you are using? I suspect your hard drive might be going.

Michael6

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
Re: Parsing File Error
« Reply #3 on: June 30, 2020, 11:25:39 am »
Thanks Utnik, I sent you a PM to try and exchange the file.

My computer is only 2 years old AdmFubar.

The same error occurred on another document I would have had opened the same time. Didn't know that until I tried to open it after my post. That one was easy to redo. Really hope I can salvage something from the main file :(

dragonfly

  • Full Member
  • ***
  • Posts: 174
  • Karma: 0
  • Scribus User
Re: Parsing File Error
« Reply #4 on: June 30, 2020, 02:25:57 pm »
I offer some ideas I have applied to recover corrupted files (not just Scribus).

First make a backup of the errant file, as an insurance policy.

Next download and install XMLCopyEditor a free XML editor.

https://sourceforge.net/projects/xml-copy-editor/

With the original document file safely backed up, open a copy of the *.sla document in XMLCopyEditor.

Since *.sla is really *.xml format you should be able to inspect the inner elements of your file.

There are two buttons in top menu showing "yellow ticks".
Check well-formedness
Validate

Check first that the document is "well-formed" (that is, it follows syntax rules).
Check next that the document is valid.

If one of these fail it may be that the xml syntax is corrupted.

It then becomes a process of trial and error to eliminate corrupt elements in the xml document.

I use a blank template Scribus document as a reference for comparison. That is, a Scribus template without content in pages. 

You can also compare Scribus XML documents (old and current document versions) using meld.
https://meldmerge.org/

========================================

[P.S] I see another related thread here which might offer more recovery ideas (such as splitting up the source document):

http://forums.scribus.net/index.php/topic,3655.15.html

========================================

[P.P.S] Another idea is to comment out blocks of xml elements in the test *.sla document to identify which page or attributes or corrupt syntax might be at fault.

More found here ..

https://stackoverflow.com/questions/2757396/how-do-i-comment-out-a-block-of-tags-in-xml


« Last Edit: June 30, 2020, 02:59:31 pm by dragonfly »

utnik

  • Hero Member
  • *****
  • Posts: 1473
  • Karma: 17
Re: Parsing File Error
« Reply #5 on: July 01, 2020, 07:18:06 pm »
i had a look at the file. it ended inside a really big embedded .psd image (around 100 megabytes). this image wasn't closed. it might have been even bigger – and could be the source of the crash…
i couldn't really recover the file. i removed the broken image and added the closing lines for a valid .xml file. the file is readable again but the part of code below the image is lost.

utnik
« Last Edit: July 01, 2020, 07:19:38 pm by utnik »

 

palmate