FAQ:Errors on opening or recovering an Audacity project

From Audacity Development Manual
Jump to: navigation, search


<  Back to: FAQ:Errors

|< Index of Frequently Asked Questions

This page deals with errors that you may encounter when opening or recovering an Audacity project.

Most of these errors are caused by malformed or broken .aup files.

Contents

  1. Error Opening Project: not well-formed (invalid token) at line x
  2. Error Opening Project: Reference to invalid character number at line x
  3. Error Importing: Aup is an Audacity Project file. Use the File > Open command
  4. Error Opening File or Project: File may be invalid or corrupted
  5. Error Opening Project: mismatched tag at line x
  6. Other errors opening project


Error Opening Project: not well-formed (invalid token) at line x

This usually means that when reopening the AUP project file normally, Audacity finds an unexpected non-English, accented or control character at the line quoted in the error message. There are two main causes of this.

  • The project contains imported files whose metadata (like artist or genre) contains control characters. This mostly occurs with iTunes files on Mac where the project was created in an older version of Audacity.
  • The project was saved containing non-English or accented characters using an old ANSI build of Audacity for Windows. ANSI builds are not properly Unicode aware, so do not support non-English or accented characters.

If Audacity or the computer crashed, Audacity will try to recover the project from its AUTOSAVE file, but the crash may have created a redundant line near the end of the file that triggers the token error. Very occasionally, the AUP file may become corrupted by one or more redundant lines, giving a token error even if there was no apparent crash. To correct this, see remove redundant lines in an AUTOSAVE or AUP file.

For details of how to fix this please see Error: not well-formed (invalid token) at line x

back to top


Error Opening Project: Reference to invalid character number at line x

This error message usually means that when reopening the AUP project file normally, Audacity finds an unexpected non-English, accented or control character at the line quoted in the error message. There are three main causes of this.

  • The project contains imported files whose metadata contains symbols that Audacity cannot display. This may create either the "(invalid token)" or "invalid character number" error
  • The project was saved containing non-English or accented characters using an old ANSI build of Audacity for Windows. ANSI builds are not properly Unicode aware, so do not support non-English or accented characters.

For details of how to fix this please see Error Opening Project: Reference to invalid character number at line x.

back to top


Error Importing: aup is an Audacity Project file. Use the File > Open command

This error usually occurs because you have attempted to open an Audacity project by using the Import command (which is reserved for audio files).

Instead, you should always use File > Open... to open an AUP (Audacity Project) file.

If you see "Error Importing" even when using File > Open..., this usually means the AUP file is seriously damaged, has been encoded other than as UTF-8 without BOM, or only contains NULL (zero) data.

NULL contents

The contents are NULL and unusable if you open the AUP file in a text editor like Notepad or TextEdit (on Mac) and see empty contents despite the file being a non-zero size. The AUP file is saved last, so a NULL AUP file can occur if you shut down the computer or close the lid on a laptop before the project is completely saved. Be sure to wait until the Audacity Status Bar says the project is saved, or until all project save progress dialogs have closed, before shutting down the machine.

If the AUP file appears empty, try to use any backup you created, such a different AUP file for an earlier stage of the project, or an exported WAV file. Failing this, you can try manual recovery of the project's _data folder, but this only works for unedited recordings.

File not saved as UTF-8 without BOM

Using Notepad on Windows to save an AUP file containing Unicode characters as UTF-8 will create this problem because Notepad adds a BOM. To solve it, open the file in Notepad++, choose Encoding > Convert to UTF-8 then save the file. Old versions of Notepad ++ may refer to the required command as Convert to UTF-8 without BOM. If the problem occurred after editing the AUP file in TextEdit on Mac, resave the file as text in Brackets or BBEdit.

back to top


Error Opening File or Project: File may be invalid or corrupted

This error is seen if the file is completely empty (0 kB) or for some cases of partial corruption of the file syntax. If the file is 0 kB, try to use any backup you created, such a different AUP file for an earlier stage of the project, or an exported WAV file. Failing this, you can try manual recovery of the project's _data folder, but this only works for unedited recordings.

If the file is non-zero size, you can try backing up the AUP file to another location, then open the file in Notepad++ for Windows (or Brackets or BBEdit for Mac) and examine if the syntax of the file is consistent and if the file is complete as expected. Compare with a known good AUP file to see what the AUP contents should look like.

back to top


Error Opening Project: mismatched tag at line x

This error usually means that for some reason, an opened tag in the XML did not have the same name as the tag that was opened, or a nested tag (inside the tag) was not closed correctly.

Examples:

Wrong - the closing tag is "tag" instead of "tags" to match the tag that was opened:

<tags>
   <tag name="ARTIST" value="Elton"/>
</tag>


Wrong - the closing "/" after "Elton" is missing:

<tags>
   <tag name="ARTIST" value="Elton">
</tags>


Correct!

<tags>
   <tag name="ARTIST" value="Elton"/>
</tags>

back to top

Other errors opening project

There are a number of other errors that you might see relating to the syntax of the AUP file not being quite correct, such as:

  • unclosed token at line x (for example, the final </project> tag is missing its ending ">"
  • no element found at line x (for example, the final </project> tag is missing in an otherwise correct file)
  • junk after document element at line x

The best advice in these cases is to examine the line quoted carefully, and don't manually edit the AUP file unless it is unavoidable.

back to top

<  Back to: FAQ:Errors

|< Index of Frequently Asked Questions