Talk:FAQ:Errors on opening or recovering an Audacity project
AUP errors
- Error Opening Project: not well-formed (invalid token) at line x
- Error Opening Project: Reference to invalid character number at line x
- Error Opening File or Project: File may be invalid or corrupted
- Error Opening Project: mismatched tag at line x
- Warning - Missing Audio Data Block File(s)
- Warning - Orphan Block File(s)
- 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 Apple Music/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.
- The latest version of Audacity will always fully support Unicode. You can check your Audacity version at (or on Mac).
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
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.
- The latest version of Audacity will always fully support Unicode. You can check your Audacity version at (or on Mac).
For details of how to fix this please see Error Opening Project: Reference to invalid character number at line x.
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.
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.
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> |
Warning - Missing Audio Data Block File(s)
Block files: Audacity stores the audio data in multiple short sections or block files (normally six seconds long). For details please see For details please see Structure of an Audacity project.
This warning message will be shown when you attempt to open an Audacity project which has audio data missing for some reason.
For further details and remedial action please see Warning - Missing Audio Data Block Files.
Warning - Orphan Block File(s)
Block files: Audacity stores the audio data in multiple short sections or block files (normally six seconds long). For details please see Structure of an Audacity project.
This warning message will be shown when you attempt to open an Audacity project which has audio data which does not appear in any of the tracks in the project.
For further details and remedial action please see Warning - Orphan Block Files.
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