Can not convert corrupted autosave file to XML

I can not convert a corrupted autosave file to XML when I follow the steps that are mentioned in the manual, because after step 7 (for Mac OS X) there is no autosave file appearing in the “Mac OS” folder that I could copy in step 8.
Link to abovementioned manual page:

Long version:
I am trying to recover an unsaved session after a crash. The automatic crash recovery offers me the recovery of this session, but when I confirm, I get the “Error: not well-formed (invalid token) at line 30675”. So I followed the corresponding steps in the abovementioned manual under “Solution to correct an AUTOSAVE file that Audacity is attempting to recover from”. My problem is: I can not convert the autosave file to XML, i.e. do step 3. I followed the manual for converting an autosave file to an xml file on Mac OS X, but step 7 does not produce an autosave file in the “Mac OS” folder.

When I skip step 3 altogether and edit line 30675 in the unaltered autosave file, the error message keeps appearing and a recovery is not possible.

Every idea is highly appreciated. Thank you!

Audacity 2.1.2 (obtained via .dmg)
OS X 10.11.6

P.S. The original session was recorded on:
Audacity 2.0.6 (obtained via apt)
Raspbian Jessie

I can confirm the steps are correct as written - I just tried them and recovered a project from a binary AUTOSAVE file saved by 2.1.3-alpha then converted to XML. However an AUTOSAVE file saved by Audacity 2.0.6 is already XML, so there is no need to convert it to XML at all. It is already editable in TextEdit.

You could attach the AUTOSAVE file if you wish. Preferably attach a backup of the file before you attempted to modify it. Please see How to attach files to forum posts.

Audacity does not officially support Pi systems so it is expected you could crash and you are on your own in that case. Use standard Windows, Mac or Linux instead.


Thank you for your feedback, Gale. I saw, that the autosave file was already XML formatted, but I decided to stuck with the manual, just in case something magical was going to happen in step 7.

I suggest to mention in the manual, which versions of Audacity use binary autosave files and therefore need conversion and which ones use XML formatted files and can skip step 7. This could have saved me a bit of a hassle with this issue. Do you know where I shall file this?

Anyways, I attached the autosave file in question as deleting line 30675 and replacing it with the string “” did not work. I’d thank you very much if you find the time to have a look into it.

I forgot the attachment and couldn’t edit. Here it is.
New Project - 2016-09-21 17-32-33 N-1.autosave (1.66 MB)

You’ve got the last line as:


Either of these should work at the end of the file:



AUTOSAVE files became binary with the 2.1.1 Release. OK I will mention this in the Manual. You will see the change in the next Audacity 2.1.3 Manual.

New Project - 2016-09-21 17-32-33 N-1.autosave (1.66 MB)

Unfortunately both of your proposals failed. I still get the “Error: not well-formed (invalid token) at line 30675”. But thank you for having a look into it.

I am right, that the edited file has to be at this directory on Linux systems?


You have not apparently downloaded the corrected file I attached in my previous post. Please try that.

Yes, but I thought you were trying to recover on Mac? On Mac the AUTOSAVE file is stored at ~/Library/Application Support/audacity/AutoSave.


Indeed I did not recognize your upload. You changed the file according to your second proposal, which I already tried. It didn’t work with your file either.

I’m trying to recover on my Raspbian Pi as I am cautious how to migrate the whole unrecovered project onto my Mac. I just wanted to convert the autosave file to XML on my Mac, as mentioned in my first post.

Whether part of the problem or not, I must stress that Audacity does not yet support Pi operating systems. We are clear about this on our site.

There are no unusual characters in the project so it should be possible to move the project to Mac.

The only other idea I had about the AUTOSAVE file is that there is no corresponding right channel for the last block file. So you could remove the reference to the last channel 0 in the file (in which case if the file recovers you get an orphaned block file error), or add a fake last channel 1 (in which case if the file recovers you get a missing block file error). I did not think that matters, but I have attached a new file with a fake block file for the last channel.

New Project - 2016-09-21 17-32-33 N-1.autosave (1.66 MB)

Just to clarify, you missed the tilde off that path. It should be


where ~/ is your home folder. If that isn’t the correct path on your system, the correct path is wherever you found the AUTOSAVE file was in the first place.


Thank you for your final post, Gale. This was the error indeed. I fetched the audacity-data directory from my pi and returned it back to the wrong directory, not suspecting anything.

I placed the corrected autosave file into


and recovering started properly. Unfortunately the recovered session is corrupted and has multiple errors, including delay between channels, glitches and dropouts. Nevertheless I thank you very much for taking your time.
Bildschirmfoto 2016-09-24 um 22.54.23.png

By the way, a couple of users have said that Audacity is more stable on Ubuntu-Mate than Raspbian Jessie.